style button value label
This commit is contained in:
parent
1e2d02a74f
commit
cd3a6024b8
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <QskTextLabel.h>
|
||||
|
||||
QSK_SUBCONTROL( ButtonValueLabel, Text )
|
||||
|
||||
QSK_SUBCONTROL( BoxWithButtons, Panel )
|
||||
|
||||
QSK_SUBCONTROL( IndoorTemperature, Panel )
|
||||
|
@ -30,9 +32,7 @@ BoxWithButtons::BoxWithButtons( const QString& title, const QString& value, bool
|
|||
auto* titleLabel = new QskTextLabel( title, titleAndValue );
|
||||
titleLabel->setFontRole( Skin::TitleFont );
|
||||
|
||||
auto* valueLabel = new QskTextLabel( value, titleAndValue );
|
||||
valueLabel->setFontRole( QskSkin::HugeFont );
|
||||
valueLabel->setTextColor( "#929CB2" );
|
||||
new ButtonValueLabel( value, titleAndValue );
|
||||
|
||||
new UpAndDownButton( layout );
|
||||
}
|
||||
|
|
|
@ -5,6 +5,30 @@
|
|||
#include "RoundedIcon.h"
|
||||
|
||||
#include <QskBoxShapeMetrics.h>
|
||||
#include <QskTextLabel.h>
|
||||
|
||||
class ButtonValueLabel : public QskTextLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QSK_SUBCONTROLS( Text )
|
||||
|
||||
ButtonValueLabel( const QString& text, QQuickItem* parent ) : QskTextLabel( text, parent )
|
||||
{
|
||||
}
|
||||
|
||||
QskAspect::Subcontrol effectiveSubcontrol(
|
||||
QskAspect::Subcontrol subControl ) const override final
|
||||
{
|
||||
if( subControl == QskTextLabel::Text )
|
||||
{
|
||||
return Text;
|
||||
}
|
||||
|
||||
return subControl;
|
||||
}
|
||||
};
|
||||
|
||||
class BoxWithButtons : public Box
|
||||
{
|
||||
|
|
|
@ -100,6 +100,8 @@ void Skin::initHints( const Palette& palette )
|
|||
ed.setColor( TimeLabel::Text, "#6776FF" );
|
||||
|
||||
// content in boxes (indoor temperature, humidity etc.):
|
||||
ed.setFontRole( ButtonValueLabel::Text, QskSkin::HugeFont );
|
||||
ed.setColor( ButtonValueLabel::Text, "#929cb2" );
|
||||
ed.setPadding( BoxWithButtons::Panel, 8 );
|
||||
|
||||
ed.setBoxShape( RoundedIcon::Panel, 6 );
|
||||
|
|
Loading…
Reference in New Issue