QskInputPanel: Support margins

This commit is contained in:
Peter Hartmann 2018-03-15 10:31:50 +01:00
parent a0995f6d72
commit 80249f0c30
3 changed files with 9 additions and 1 deletions

View File

@ -559,7 +559,7 @@ void QskSquiekSkin::initInputPanelHints()
const ColorPalette& pal = m_data->palette;
// key panel
// setMargins( Q::Panel | Margin, 2 ); // should be Panel | Spacing
setMargins( QskInputPanel::Panel | Margin, 2 );
setButton( Q::Panel, Raised );
setButton( Q::Panel | Q::Pressed, Sunken );

View File

@ -139,6 +139,8 @@ namespace
};
}
QSK_SUBCONTROL( QskInputPanel, Panel )
QSK_SUBCONTROL( QskKeyButton, Panel )
QSK_SUBCONTROL( QskKeyButton, Text )
QSK_SUBCONTROL( QskKeyButton, TextCancelButton )
@ -242,6 +244,9 @@ QskInputPanel::QskInputPanel( QQuickItem* parent ):
initSizePolicy( QskSizePolicy::Expanding, QskSizePolicy::Expanding );
auto margins = marginsHint( Panel | QskAspect::Margin );
setMargins( margins );
updateLocale( locale() );
QObject::connect( this, &QskControl::localeChanged,

View File

@ -48,6 +48,9 @@ class QSK_EXPORT QskInputPanel : public QskControl
using Inherited = QskControl;
public:
QSK_SUBCONTROLS( Panel )
struct KeyData
{
Qt::Key key = Qt::Key( 0 );