From 543b85a4513d2d1da8b0220529c28de1a989a51e Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Mon, 12 May 2025 22:17:49 -0500 Subject: DolphinQt: Make WrapInScrollArea and GetWrappedWidget less hacky. --- Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp') diff --git a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp index bce1e89b68..6b7e487bde 100644 --- a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp +++ b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp @@ -32,8 +32,6 @@ #include "DolphinQt/QtUtils/SetWindowDecorations.h" #include "DolphinQt/QtUtils/WrapInScrollArea.h" -#include "UICommon/GameFile.h" - GeckoCodeWidget::GeckoCodeWidget(std::string game_id, std::string gametdb_id, u16 game_revision, bool restart_required) : m_game_id(std::move(game_id)), m_gametdb_id(std::move(gametdb_id)), @@ -105,7 +103,7 @@ void GeckoCodeWidget::CreateWidgets() m_download_codes->setToolTip(tr("Download Codes from the WiiRD Database")); - auto* layout = new QVBoxLayout; + auto* const layout = new QVBoxLayout{this}; layout->addWidget(m_warning); #ifdef USE_RETRO_ACHIEVEMENTS @@ -139,8 +137,6 @@ void GeckoCodeWidget::CreateWidgets() btn_layout->addWidget(m_download_codes); layout->addLayout(btn_layout); - - WrapInScrollArea(this, layout); } void GeckoCodeWidget::ConnectWidgets() -- cgit v1.2.3 From aafe961177f252aacbb1b439b89c3590b79cf08b Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Mon, 26 May 2025 15:09:37 -0500 Subject: DolphinQt: Make GeckoCodeWidget default size not taller than it needs to be. --- Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp') diff --git a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp index 6b7e487bde..de0f79a904 100644 --- a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp +++ b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp @@ -29,6 +29,7 @@ #include "DolphinQt/Config/HardcoreWarningWidget.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h" +#include "DolphinQt/QtUtils/QtUtils.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" #include "DolphinQt/QtUtils/WrapInScrollArea.h" @@ -74,7 +75,7 @@ void GeckoCodeWidget::CreateWidgets() #ifdef USE_RETRO_ACHIEVEMENTS m_hc_warning = new HardcoreWarningWidget(this); #endif // USE_RETRO_ACHIEVEMENTS - m_code_list = new QListWidget; + m_code_list = new QtUtils::MinimumSizeHintWidget; m_name_label = new QLabel; m_creator_label = new QLabel; -- cgit v1.2.3