Put indoor temperature inside a box
This commit is contained in:
parent
af16ec3696
commit
ba1ffbbac1
|
@ -23,4 +23,9 @@ Box::Box( const QString& title, QQuickItem* parent )
|
|||
setBoxBorderColorsHint( QskBox::Panel, borderColors );
|
||||
|
||||
m_label->setFontRole( DaytimeSkin::TitleFont );
|
||||
|
||||
if( m_label->text().isEmpty() )
|
||||
{
|
||||
m_label->setVisible( false );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,17 +11,19 @@
|
|||
#include <QImage>
|
||||
|
||||
IndoorTemperature::IndoorTemperature( QQuickItem* parent )
|
||||
: QskLinearBox(Qt::Horizontal, parent)
|
||||
: Box( "", parent )
|
||||
{
|
||||
setMargins(17);
|
||||
setSpacing(20);
|
||||
setMarginsHint( Panel | QskAspect::Padding, 10 );
|
||||
|
||||
auto* layout = new QskLinearBox( Qt::Horizontal, this );
|
||||
layout->setSpacing( 20 );
|
||||
|
||||
QskGradient gradient( QskGradient::Vertical, "#ff7d34", "#ff3122" );
|
||||
auto* icon = new RoundedIcon("indoor-temperature", gradient, this);
|
||||
auto* icon = new RoundedIcon( "indoor-temperature", gradient, layout );
|
||||
icon->setMinimumWidth( 68 );
|
||||
icon->setFixedSize( 68, 68 ); // ### fix properly
|
||||
|
||||
auto *titleAndValue = new QskLinearBox(Qt::Vertical, this);
|
||||
auto* titleAndValue = new QskLinearBox( Qt::Vertical, layout );
|
||||
|
||||
auto* title = new QskTextLabel( "Indoor Temperature", titleAndValue );
|
||||
title->setFontRole( DaytimeSkin::TitleFont );
|
||||
|
@ -30,7 +32,7 @@ IndoorTemperature::IndoorTemperature(QQuickItem *parent)
|
|||
value->setFontRole( QskSkin::HugeFont );
|
||||
value->setTextColor( "#929CB2" );
|
||||
|
||||
auto* buttons = new QskLinearBox(Qt::Vertical, this);
|
||||
auto* buttons = new QskLinearBox( Qt::Vertical, layout );
|
||||
buttons->setSizePolicy( Qt::Horizontal, QskSizePolicy::Fixed );
|
||||
buttons->setSpacing( 0 );
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef INDOORTEMPERATURE_H
|
||||
#define INDOORTEMPERATURE_H
|
||||
|
||||
#include <QskLinearBox.h>
|
||||
#include <Box.h>
|
||||
|
||||
class IndoorTemperature : public QskLinearBox
|
||||
class IndoorTemperature : public Box
|
||||
{
|
||||
public:
|
||||
IndoorTemperature( QQuickItem* parent );
|
||||
|
|
Loading…
Reference in New Issue