put Humidity in a box
This commit is contained in:
parent
ba1ffbbac1
commit
116376a77a
|
@ -11,17 +11,19 @@
|
|||
#include <QImage>
|
||||
|
||||
Humidity::Humidity( 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, "#6776FF", "#6100FF" );
|
||||
auto* icon = new RoundedIcon("humidity", gradient, this);
|
||||
auto* icon = new RoundedIcon( "humidity", 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( "Humidity", titleAndValue );
|
||||
title->setFontRole( DaytimeSkin::TitleFont );
|
||||
|
@ -30,7 +32,7 @@ Humidity::Humidity(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 HUMIDITY_H
|
||||
#define HUMIDITY_H
|
||||
|
||||
#include <QskLinearBox.h>
|
||||
#include "Box.h"
|
||||
|
||||
class Humidity : public QskLinearBox
|
||||
class Humidity : public Box
|
||||
{
|
||||
public:
|
||||
Humidity( QQuickItem* parent );
|
||||
|
|
Loading…
Reference in New Issue