From 16e868b46a676060386a174755a2d324429696a1 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Wed, 26 Jun 2024 22:41:11 -0400 Subject: [PATCH 1/5] Removed large empty space at the bottom of achievement/leaderboard lists --- .../Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp | 1 + Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp b/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp index e7578a31e9..2a1f07b8da 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp @@ -30,6 +30,7 @@ AchievementLeaderboardWidget::AchievementLeaderboardWidget(QWidget* parent) : QW layout->setContentsMargins(0, 0, 0, 0); layout->setAlignment(Qt::AlignTop); layout->addWidget(m_common_box); + layout->setSizeConstraint(QLayout::SetFixedSize); setLayout(layout); } diff --git a/Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp b/Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp index 741cb61227..ca5a10ab31 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp @@ -33,6 +33,7 @@ AchievementProgressWidget::AchievementProgressWidget(QWidget* parent) : QWidget( layout->setContentsMargins(0, 0, 0, 0); layout->setAlignment(Qt::AlignTop); layout->addWidget(m_common_box); + layout->setSizeConstraint(QLayout::SetFixedSize); setLayout(layout); } From 7ffcde3ab3570525bed0c3a366693d892c4fb3ec Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Wed, 26 Jun 2024 22:41:39 -0400 Subject: [PATCH 2/5] Fixed misaligned borders on unlocked achievement badges --- Source/Core/DolphinQt/Achievements/AchievementBox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Achievements/AchievementBox.cpp b/Source/Core/DolphinQt/Achievements/AchievementBox.cpp index 1e524db38f..84544bfc06 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementBox.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementBox.cpp @@ -47,6 +47,12 @@ AchievementBox::AchievementBox(QWidget* parent, rc_client_achievement_t* achieve m_progress_label->setStyleSheet(QStringLiteral("background-color:transparent;")); m_progress_label->setAlignment(Qt::AlignCenter); + QVBoxLayout* a_col_left = new QVBoxLayout(); + a_col_left->addSpacerItem(new QSpacerItem(0, 0)); + a_col_left->addWidget(m_badge); + a_col_left->addSpacerItem(new QSpacerItem(0, 0)); + a_col_left->setSizeConstraint(QLayout::SetFixedSize); + a_col_left->setAlignment(Qt::AlignCenter); QVBoxLayout* a_col_right = new QVBoxLayout(); a_col_right->addWidget(title); a_col_right->addWidget(description); @@ -57,7 +63,7 @@ AchievementBox::AchievementBox(QWidget* parent, rc_client_achievement_t* achieve a_prog_layout->setContentsMargins(0, 0, 0, 0); a_prog_layout->addWidget(m_progress_label); QHBoxLayout* a_total = new QHBoxLayout(); - a_total->addWidget(m_badge); + a_total->addLayout(a_col_left); a_total->addLayout(a_col_right); setLayout(a_total); From 56e1c234133f2f7cbbd5b5f6efa9e5f85b4f97c4 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Wed, 26 Jun 2024 22:42:01 -0400 Subject: [PATCH 3/5] Fixed floating overlapping leaderboard bucket headers --- .../AchievementLeaderboardWidget.cpp | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp b/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp index 2a1f07b8da..c15afea34f 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp @@ -51,7 +51,8 @@ void AchievementLeaderboardWidget::UpdateData(bool clean_all) for (u32 bucket = 0; bucket < leaderboard_list->num_buckets; bucket++) { const auto& leaderboard_bucket = leaderboard_list->buckets[bucket]; - m_common_layout->addWidget(new QLabel(tr(leaderboard_bucket.label))); + m_common_layout->addWidget(new QLabel(tr(leaderboard_bucket.label)), row, 0); + row += 2; for (u32 board = 0; board < leaderboard_bucket.num_leaderboards; board++) { const auto* leaderboard = leaderboard_bucket.leaderboards[board]; @@ -65,24 +66,18 @@ void AchievementLeaderboardWidget::UpdateData(bool clean_all) QVBoxLayout* a_col_left = new QVBoxLayout(); a_col_left->addWidget(a_title); a_col_left->addWidget(a_description); - if (row > 0) - { - QFrame* a_divider = new QFrame(); - a_divider->setFrameShape(QFrame::HLine); - m_common_layout->addWidget(a_divider, row - 1, 0); - } + QFrame* a_divider = new QFrame(); + a_divider->setFrameShape(QFrame::HLine); + m_common_layout->addWidget(a_divider, row - 1, 0); m_common_layout->addLayout(a_col_left, row, 0); for (size_t ix = 0; ix < 4; ix++) { QVBoxLayout* a_col = new QVBoxLayout(); for (size_t jx = 0; jx < 3; jx++) a_col->addWidget(new QLabel(QStringLiteral("---"))); - if (row > 0) - { - QFrame* a_divider = new QFrame(); - a_divider->setFrameShape(QFrame::HLine); - m_common_layout->addWidget(a_divider, row - 1, static_cast(ix) + 1); - } + QFrame* a_divider_2 = new QFrame(); + a_divider_2->setFrameShape(QFrame::HLine); + m_common_layout->addWidget(a_divider_2, row - 1, static_cast(ix) + 1); m_common_layout->addLayout(a_col, row, static_cast(ix) + 1); } row += 2; From 0615db9e2ec81290734c23f67fa14b86b6fb51f6 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Thu, 27 Jun 2024 00:02:39 -0400 Subject: [PATCH 4/5] Made progress bars more legible in dark mode --- Source/Core/DolphinQt/Styles/Dark/dark.qss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/DolphinQt/Styles/Dark/dark.qss b/Source/Core/DolphinQt/Styles/Dark/dark.qss index cfaf873feb..4ef591c1ee 100644 --- a/Source/Core/DolphinQt/Styles/Dark/dark.qss +++ b/Source/Core/DolphinQt/Styles/Dark/dark.qss @@ -493,3 +493,10 @@ QTableCornerButton::section { border-left: 0px; border-bottom: 0px; } + +QProgressBar { + border: 2px solid grey; + border-radius: 5px; + background-color: #202020; + } + \ No newline at end of file From de7bf2b6a58f0bb39da7d727ee05943f306b136f Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Thu, 27 Jun 2024 00:35:07 -0400 Subject: [PATCH 5/5] Move achievement dialog scrollbars to top when changing games --- Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp b/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp index a0e750c4ba..7793843d68 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp @@ -7,6 +7,8 @@ #include #include +#include +#include #include #include @@ -83,6 +85,8 @@ void AchievementsWindow::UpdateData(AchievementManager::UpdatedItems updated_ite m_header_widget->UpdateData(); m_progress_widget->UpdateData(true); m_leaderboard_widget->UpdateData(true); + static_cast(m_tab_widget->widget(1))->verticalScrollBar()->setValue(0); + static_cast(m_tab_widget->widget(2))->verticalScrollBar()->setValue(0); } else {