diff --git a/skins/squiek/QskSquiekSkin.cpp b/skins/squiek/QskSquiekSkin.cpp index 2effd19d..ed700ba2 100644 --- a/skins/squiek/QskSquiekSkin.cpp +++ b/skins/squiek/QskSquiekSkin.cpp @@ -559,8 +559,8 @@ void QskSquiekSkin::initInputPanelHints() const ColorPalette& pal = m_data->palette; // key panel - setMargins( QskInputPanel::Panel | Margin, 2 ); - setButton( QskInputPanel::Panel, Raised ); + setMargins( QskInputPanel::Panel | Padding, 5 ); + setPanel( QskInputPanel::Panel, Raised ); setButton( Q::Panel, Raised ); setButton( Q::Panel | Q::Pressed, Sunken ); diff --git a/src/controls/QskInputPanel.cpp b/src/controls/QskInputPanel.cpp index 75afeae9..99c55199 100644 --- a/src/controls/QskInputPanel.cpp +++ b/src/controls/QskInputPanel.cpp @@ -559,14 +559,6 @@ void QskInputPanel::setCandidateOffset( int candidateOffset ) } } -QRectF QskInputPanel::keyboardRect() const -{ - auto keyboardRect = rect(); // ### margins? would eliminate this thing below - // if ( QskDialog::instance()->policy() != QskDialog::TopLevelWindow ) - // keyboardRect.adjust( 0, keyboardRect.height() * 0.5, 0, 0 ); - return keyboardRect; -} - void QskInputPanel::registerCompositionModelForLocale( const QLocale& locale, QskInputCompositionModel* model ) { @@ -586,18 +578,19 @@ void QskInputPanel::updateLayout() if( geometry().isNull() ) return; // no need to calculate anything, will be called again - QMarginsF margins = marginsHint( Panel | QskAspect::Margin ); - QRectF rect = keyboardRect().marginsRemoved( margins ); + QRectF rect = layoutRect(); qreal verticalSpacing = m_data->buttonsBox->spacing(); - for( QQuickItem* rowItem : m_data->buttonsBox->childItems() ) + const auto& children = m_data->buttonsBox->childItems(); + for( auto rowItem : children ) { - QskLinearBox* rowBox = qobject_cast< QskLinearBox* >( rowItem ); - qreal horizontalSpacing = rowBox->spacing(); + auto rowBox = qobject_cast< QskLinearBox* >( rowItem ); + const qreal horizontalSpacing = rowBox->spacing(); - for( QQuickItem* keyItem : rowBox->childItems() ) + const auto& rowChildren = rowBox->childItems(); + for( auto keyItem : rowChildren ) { - QskKeyButton* button = qobject_cast< QskKeyButton* >( keyItem ); + auto button = qobject_cast< QskKeyButton* >( keyItem ); QRectF keyRect = keyDataAt( button->keyIndex() ).rect; qreal width = keyRect.width() * rect.width() - horizontalSpacing; qreal height = keyRect.height() * rect.height() - verticalSpacing; diff --git a/src/controls/QskInputPanel.h b/src/controls/QskInputPanel.h index 8b17bb8d..16a5fa75 100644 --- a/src/controls/QskInputPanel.h +++ b/src/controls/QskInputPanel.h @@ -42,8 +42,6 @@ class QSK_EXPORT QskInputPanel : public QskBox { Q_OBJECT - Q_PROPERTY( QRectF keyboardRect READ keyboardRect NOTIFY keyboardRectChanged ) - Q_PROPERTY( QString displayLanguageName READ displayLanguageName NOTIFY displayLanguageNameChanged )