From e596ee2b68f359397c7828c71f206e906d81cbe7 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 21 Apr 2023 13:41:58 +0200 Subject: [PATCH] Examples/Marketplace: Put horizontal ruler into the heading Avoid the separate line above the heading, which also doesn't make much sense for the first item. Change-Id: I2cb4aa270f805552215f4f3dc114103f9f3c313f Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/welcomepagehelper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index bc3afe89ee1..62f8ef6054a 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -747,7 +747,11 @@ ListModel *SectionedGridView::addSection(const Section §ion, const QList" + Tr::tr("Show All") + " >", this); seeAllLink->setVisible(gridView->maxRows().has_value()); connect(seeAllLink, &QLabel::linkActivated, this, [this, section] { zoomInSection(section); }); - QWidget *sectionLabel = Column{hr, Row{section.name, st, seeAllLink, Space(HSpacing)}}.emerge( + QWidget *line = createHr(this); + QSizePolicy linePolicy(QSizePolicy::Expanding, QSizePolicy::Ignored); + linePolicy.setHorizontalStretch(2); + line->setSizePolicy(linePolicy); + QWidget *sectionLabel = Row{section.name, line, seeAllLink, Space(HSpacing)}.emerge( Layouting::WithoutMargins); m_sectionLabels.append(sectionLabel); sectionLabel->setContentsMargins(0, ItemGap, 0, 0);