QskSkinnable::subcontrolProxy added
This commit is contained in:
parent
d947920abe
commit
3606f61c65
|
@ -13,6 +13,8 @@
|
|||
|
||||
QSK_SUBCONTROL( ButtonBar, Indicator )
|
||||
|
||||
namespace
|
||||
{
|
||||
class IndicatorLabel final : public QskGraphicLabel
|
||||
{
|
||||
public:
|
||||
|
@ -24,6 +26,7 @@ class IndicatorLabel final : public QskGraphicLabel
|
|||
setSubcontrolProxy( QskGraphicLabel::Graphic, ButtonBar::Indicator );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
ButtonBar::ButtonBar( QQuickItem* parentItem )
|
||||
: QskLinearBox( parentItem )
|
||||
|
|
|
@ -15,25 +15,13 @@ Box::Box( const QString& title, QQuickItem* parent )
|
|||
{
|
||||
setAutoAddChildren( true );
|
||||
setAutoLayoutChildren( true );
|
||||
|
||||
setPanel( true );
|
||||
setSubcontrolProxy( QskBox::Panel, Box::Panel );
|
||||
|
||||
auto label = new QskTextLabel( title, this );
|
||||
label->setFontRole( Skin::TitleFont );
|
||||
|
||||
if( label->text().isEmpty() )
|
||||
{
|
||||
label->setVisible( false );
|
||||
}
|
||||
}
|
||||
|
||||
QskAspect::Subcontrol Box::substitutedSubcontrol( QskAspect::Subcontrol subControl ) const
|
||||
{
|
||||
if( subControl == QskBox::Panel )
|
||||
{
|
||||
return Box::Panel;
|
||||
}
|
||||
|
||||
return subControl;
|
||||
label->setVisible( !tite.isEmpty() );
|
||||
}
|
||||
|
||||
#include "moc_Box.cpp"
|
||||
|
|
|
@ -17,9 +17,4 @@ class Box : public QskLinearBox
|
|||
QSK_SUBCONTROLS( Panel )
|
||||
|
||||
Box( const QString& title, QQuickItem* parent = nullptr );
|
||||
|
||||
protected:
|
||||
|
||||
QskAspect::Subcontrol substitutedSubcontrol(
|
||||
QskAspect::Subcontrol ) const override;
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@ BoxWithButtons::BoxWithButtons( const QString& title, const QString& value,
|
|||
|
||||
setSizePolicy( Qt::Vertical, QskSizePolicy::Maximum );
|
||||
|
||||
auto layout = new QskLinearBox( Qt::Horizontal, this );
|
||||
auto* layout = new QskLinearBox( Qt::Horizontal, this );
|
||||
layout->setSpacing( 20 );
|
||||
|
||||
QString iconFile = title.toLower();
|
||||
|
|
|
@ -217,7 +217,6 @@ class QskSkinnable::PrivateData
|
|||
}
|
||||
|
||||
QskSkinHintTable hintTable;
|
||||
|
||||
QskHintAnimatorTable animators;
|
||||
|
||||
typedef std::map< QskAspect::Subcontrol, QskAspect::Subcontrol > ProxyMap;
|
||||
|
|
Loading…
Reference in New Issue