From 8a91e3c54ceec0427d748a0c1e6be598809db9fa Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 21 Dec 2022 17:26:52 +0100 Subject: [PATCH] IOT dashboard: Improve menu bar styling --- examples/iotdashboard/MenuBar.cpp | 2 +- examples/iotdashboard/Skin.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/iotdashboard/MenuBar.cpp b/examples/iotdashboard/MenuBar.cpp index ccbcd5d3..4d3c0ef4 100644 --- a/examples/iotdashboard/MenuBar.cpp +++ b/examples/iotdashboard/MenuBar.cpp @@ -38,7 +38,7 @@ MenuBar::MenuBar( QQuickItem* parent ) setSubcontrolProxy( QskBox::Panel, MenuBar::Panel ); initSizePolicy( QskSizePolicy::Minimum, QskSizePolicy::Preferred ); - setSpacing( 8 ); + setSpacing( 0 ); auto graphicLabel = new MenuBarTopLabel( "main-icon", this ); graphicLabel->setMargins( marginHint( MenuBarTopLabel::Graphic ) ); diff --git a/examples/iotdashboard/Skin.cpp b/examples/iotdashboard/Skin.cpp index abfaf1bc..779871e0 100644 --- a/examples/iotdashboard/Skin.cpp +++ b/examples/iotdashboard/Skin.cpp @@ -90,7 +90,7 @@ void Skin::initHints( const Palette& palette ) ed.setPadding( MenuBar::Panel, {0, 35, 0, 12} ); ed.setStrutSize( MenuItem::Panel | QskAspect::Size, {140, 40} ); - ed.setPadding( MenuItem::Panel, {30, 0, 30, 0} ); + ed.setPadding( MenuItem::Panel, {30, 16, 30, 16} ); QColor color( Qt::white ); color.setAlphaF( 0.09 ); ed.setGradient( MenuItem::Panel | QskControl::Hovered, color ); @@ -100,7 +100,7 @@ void Skin::initHints( const Palette& palette ) ed.setColor( MenuBarLabel::Text, Qt::white ); ed.setFontRole( MenuBarLabel::Text, QskSkin::SmallFont ); - ed.setMargin( MenuBarTopLabel::Graphic, { 50, 0, 50, 54 } ); + ed.setMargin( MenuBarTopLabel::Graphic, { 50, 5, 50, 65 } ); ed.setMetric( MenuBarGraphicLabel::Graphic | QskAspect::Size, 14 ); ed.setAlignment( MenuBarGraphicLabel::Graphic, Qt::AlignCenter );