summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2023-04-26 04:12:03 -0400
committerGitHub <noreply@github.com>2023-04-26 04:12:03 -0400
commitadbee91dcadb401332c0dd713c86f1e0233c7786 (patch)
tree091e749e923369aa407b032b43b8d5ffa902bcc6 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parente483b5693f93f929a0f5b1341ab1f78a33b975a5 (diff)
parentbb227ad7bbf734a0efe29288e79f0d22654ee399 (diff)
Merge pull request #11794 from shuffle2/color-scheme-changed
DolphinQt: reset stylesheets on colorSchemeChanged
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index edac049a96..cd93541736 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -19,6 +19,7 @@
#include <QPainter>
#include <QResizeEvent>
#include <QScrollBar>
+#include <QStyleHints>
#include <QStyledItemDelegate>
#include <QTableWidgetItem>
#include <QWheelEvent>
@@ -161,6 +162,11 @@ CodeViewWidget::CodeViewWidget() : m_system(Core::System::GetInstance())
FontBasedSizing();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this,
+ [this](Qt::ColorScheme colorScheme) { OnSelectionChanged(); });
+#endif
+
connect(this, &CodeViewWidget::customContextMenuRequested, this, &CodeViewWidget::OnContextMenu);
connect(this, &CodeViewWidget::itemSelectionChanged, this, &CodeViewWidget::OnSelectionChanged);
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &QWidget::setFont);