diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2024-03-06 20:39:39 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2024-03-06 19:40:24 +0000 |
commit | cc30e923ff761f2c94186cfd5eceee2074f4e69d (patch) | |
tree | fd0b7e4fd13542204a29e6917b559a4e8351843a /src/plugins/welcome | |
parent | e3f099b8f35f60ce500d8d50bd4513c21dbc11b8 (diff) |
Welcome: Also hide separator lines when collapsing top- and side areas
This moves the separator lines into the respective areas, so that the
lines also disappear when their area collapes. Looks cleaner (for pixel
obsessed people like me).
Change-Id: I314c2c462767666638eae57087606f2a6ca4ae4a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 4b3a5074f95..8f969c107fe 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -156,12 +156,16 @@ public: using namespace Layouting; - Row { - ideIconLabel, - welcomeLabel, - st, - spacing(ExVPaddingGapXl), - customMargin({HPaddingM, VPaddingM, HPaddingM, VPaddingM}), + Column { + Row { + ideIconLabel, + welcomeLabel, + st, + spacing(ExVPaddingGapXl), + customMargin({HPaddingM, VPaddingM, HPaddingM, VPaddingM}), + }, + createRule(Qt::Horizontal), + noMargin(), spacing(0), }.attachTo(this); } }; @@ -182,7 +186,7 @@ public: using namespace Layouting; - Column mainLayout { + Column mainColumn { spacing(0), customMargin({ExVPaddingGapXl, 0, ExVPaddingGapXl, 0}), }; @@ -224,8 +228,8 @@ public: } essentials.attachTo(m_essentials); - mainLayout.addItem(m_essentials); - mainLayout.addItem(st); + mainColumn.addItem(m_essentials); + mainColumn.addItem(st); { auto label = new Label(Tr::tr("Explore more"), Label::Secondary); @@ -263,10 +267,17 @@ public: m_links = new QWidget; linksLayout.attachTo(m_links); - mainLayout.addItem(m_links); + mainColumn.addItem(m_links); } - QWidget *mainWidget = mainLayout.emerge(); + QWidget *mainWidget = new QWidget; + + Row { + mainColumn, + createRule(Qt::Vertical), + noMargin(), spacing(0), + }.attachTo(mainWidget); + setWidget(mainWidget); } @@ -327,10 +338,8 @@ WelcomeMode::WelcomeMode() Column { new StyledBar, m_topArea, - createRule(Qt::Horizontal), Row { m_sideArea, - createRule(Qt::Vertical), m_pageStack, }, noMargin(), |