forked from qt-creator/qt-creator
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 <alessandro.portale@qt.io>
This commit is contained in:
@@ -747,7 +747,11 @@ ListModel *SectionedGridView::addSection(const Section §ion, const QList<Lis
|
|||||||
auto seeAllLink = new QLabel("<a href=\"link\">" + Tr::tr("Show All") + " ></a>", this);
|
auto seeAllLink = new QLabel("<a href=\"link\">" + Tr::tr("Show All") + " ></a>", this);
|
||||||
seeAllLink->setVisible(gridView->maxRows().has_value());
|
seeAllLink->setVisible(gridView->maxRows().has_value());
|
||||||
connect(seeAllLink, &QLabel::linkActivated, this, [this, section] { zoomInSection(section); });
|
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);
|
Layouting::WithoutMargins);
|
||||||
m_sectionLabels.append(sectionLabel);
|
m_sectionLabels.append(sectionLabel);
|
||||||
sectionLabel->setContentsMargins(0, ItemGap, 0, 0);
|
sectionLabel->setContentsMargins(0, ItemGap, 0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user