summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-05-15 13:24:18 -0500
committerGitHub <noreply@github.com>2025-05-15 13:24:18 -0500
commitfc833f845c1d9f2ce158413ed2aed05b7e3e7ab2 (patch)
tree0d7d70c9f6efe34f9d0dee764afc021d9fa3deb4 /Source/Core/DolphinQt/Config/GameConfigWidget.cpp
parentc211efd84a5ec159e6cf82498cf01c0ac05b94c0 (diff)
parent17eb1b1a344ffcfc3a2e139fae7347f01cad3157 (diff)
Merge pull request #13660 from jordan-woyak/consistent-icon-text
DolphinQt: Add utility function for creating label text with a standard icon.
Diffstat (limited to 'Source/Core/DolphinQt/Config/GameConfigWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/GameConfigWidget.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/Core/DolphinQt/Config/GameConfigWidget.cpp b/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
index 99d7b45cce..a96046f916 100644
--- a/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
+++ b/Source/Core/DolphinQt/Config/GameConfigWidget.cpp
@@ -32,6 +32,7 @@
#include "DolphinQt/Config/Graphics/EnhancementsWidget.h"
#include "DolphinQt/Config/Graphics/GeneralWidget.h"
#include "DolphinQt/Config/Graphics/HacksWidget.h"
+#include "DolphinQt/QtUtils/QtUtils.h"
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
#include "UICommon/GameFile.h"
@@ -259,18 +260,14 @@ void GameConfigWidget::CreateWidgets()
"settings are disabled when the global graphics backend doesn't "
"match the game setting.");
- auto help_icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion);
- auto* help_label = new QLabel(tr("These settings override core Dolphin settings."));
- help_label->setToolTip(help_msg);
- auto help_label_icon = new QLabel();
- help_label_icon->setPixmap(help_icon.pixmap(12, 12));
- help_label_icon->setToolTip(help_msg);
- auto* help_layout = new QHBoxLayout();
- help_layout->addWidget(help_label);
- help_layout->addWidget(help_label_icon);
- help_layout->addStretch();
-
- layout->addLayout(help_layout);
+ auto* const help_label = new QLabel(tr("These settings override core Dolphin settings."));
+
+ auto* const help_widget =
+ QtUtils::CreateIconWarning(this, QStyle::SP_MessageBoxQuestion, help_label);
+
+ help_widget->setToolTip(help_msg);
+
+ layout->addWidget(help_widget);
layout->addWidget(tab_widget);
setLayout(layout);
}