more size hints

This commit is contained in:
Peter Hartmann 2021-03-26 10:38:27 +01:00
parent b4f887e121
commit 98751d1ae0
4 changed files with 13 additions and 5 deletions

View File

@ -60,6 +60,7 @@ void DaytimeSkin::initHints()
ed.setPadding( MenuBar::Panel, {0, 35, 0, 12} ); ed.setPadding( MenuBar::Panel, {0, 35, 0, 12} );
ed.setGradient( MenuBar::Panel, {"#6D7BFB"} ); ed.setGradient( MenuBar::Panel, {"#6D7BFB"} );
ed.setStrutSize( MenuItem::Panel | QskAspect::Size, {140, 40} );
ed.setPadding( MenuItem::Panel, {30, 0, 30, 0} ); ed.setPadding( MenuItem::Panel, {30, 0, 30, 0} );
QColor color( Qt::white ); QColor color( Qt::white );
color.setAlphaF( 0.09 ); color.setAlphaF( 0.09 );

View File

@ -13,4 +13,6 @@ MainWindow::MainWindow()
{ {
setPreferredSize( { 1024, 600 } ); setPreferredSize( { 1024, 600 } );
setTitle( "IOT dashboard" ); setTitle( "IOT dashboard" );
m_mainLayout->setSpacing( 0 );
} }

View File

@ -15,7 +15,7 @@ MenuItem::MenuItem( const QString& name, QQuickItem* parent ) : QskLinearBox( Qt
{ {
setAutoLayoutChildren( true ); setAutoLayoutChildren( true );
setAutoAddChildren( true ); setAutoAddChildren( true );
setFixedSize( {140, 40} ); setSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Fixed );
setSpacing( 6 ); setSpacing( 6 );
setAcceptHoverEvents( true ); setAcceptHoverEvents( true );

View File

@ -57,6 +57,15 @@ void NighttimeSkin::initHints()
QskSkinHintTableEditor ed( &hintTable() ); QskSkinHintTableEditor ed( &hintTable() );
ed.setPadding( MenuBar::Panel, {0, 35, 0, 12} );
ed.setGradient( MenuBar::Panel, {"#2937A7"} );
ed.setStrutSize( MenuItem::Panel | QskAspect::Size, {140, 40} );
ed.setPadding( MenuItem::Panel, {30, 0, 30, 0} );
QColor color( Qt::white );
color.setAlphaF( 0.09 );
ed.setGradient( MenuItem::Panel | QskControl::Hovered, color );
ed.setGradient( MainContent::Panel, {"#040404"} ); ed.setGradient( MainContent::Panel, {"#040404"} );
ed.setGradient( Box::Panel, {"#000000"} ); ed.setGradient( Box::Panel, {"#000000"} );
ed.setColor( LightDisplay::Panel, "#000000" ); ed.setColor( LightDisplay::Panel, "#000000" );
@ -65,8 +74,4 @@ void NighttimeSkin::initHints()
ed.setBoxBorderColors( WeekdayBox::Panel, {"#0c0c0c"} ); ed.setBoxBorderColors( WeekdayBox::Panel, {"#0c0c0c"} );
ed.setColor( QskTextLabel::Text, "#ffffff" ); ed.setColor( QskTextLabel::Text, "#ffffff" );
QColor color( Qt::white );
color.setAlphaF( 0.09 );
ed.setGradient( MenuItem::Panel | QskControl::Hovered, color );
} }