From a32c2b1104c96c0ca95a53da865a6d9f2b9ce2f0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 12 Dec 2021 16:43:22 +0100 Subject: [PATCH] ui/about: Remove additional spacers These just break the flow, with no visual improvement. --- source/ui/ui-about.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/source/ui/ui-about.cpp b/source/ui/ui-about.cpp index 5ea18e92..74f6c303 100644 --- a/source/ui/ui-about.cpp +++ b/source/ui/ui-about.cpp @@ -138,12 +138,13 @@ streamfx::ui::about::about() : QDialog(reinterpret_cast(obs_frontend_g int row = 0; int column = 0; int thanks = 0; - int spacer = 0; // Fix columns being stretched for no reason. layout->setColumnStretch(0, 1); layout->setColumnStretch(1, 1); + D_LOG_DEBUG("Building grid of Thank You entries...", ""); + // Randomize the list. std::shuffle(entries.begin(), entries.end(), generator); for (auto entry : entries) { @@ -152,13 +153,14 @@ streamfx::ui::about::about() : QDialog(reinterpret_cast(obs_frontend_g layout->addWidget(v, row, column); layout->setRowStretch(row, 0); + D_LOG_DEBUG(" Added '%s' => '%s'.", entry.name.c_str(), entry.link.c_str()); + // Proceed down the grid. column += 1; if (column >= 2) { column = 0; row += 1; thanks += 1; - spacer += 1; if (thanks % 9 == 8) { // "Thank you" every 8 rows. auto image = new QLabel(content); @@ -171,24 +173,6 @@ streamfx::ui::about::about() : QDialog(reinterpret_cast(obs_frontend_g thanks = 0; row += 1; - } else if (spacer % 6 == 5) { // Spacer every 5 rows. - auto separator = new QFrame(content); - separator->setFrameShape(QFrame::HLine); - separator->setFrameShadow(QFrame::Sunken); - separator->setMaximumHeight(1); - separator->setMinimumHeight(1); - separator->setFixedHeight(1); - separator->setLineWidth(1); - { - auto sp = separator->sizePolicy(); - sp.setVerticalPolicy(QSizePolicy::Fixed); - separator->setSizePolicy(sp); - } - layout->addWidget(separator, row, 0, 1, 2); - layout->setRowStretch(row, 0); - - spacer = 0; - row += 1; } } }