summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-07-18 17:02:41 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-07-18 17:02:41 +0200
commit617eeb09e03f9f2727269c0424a05ee5678f32b9 (patch)
tree1727c3213572a9fd93d8f42cbb4d9f09d54e9f6e
parentfrontend: Improve wait tree readability for dark themes (diff)
downloadyuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.tar
yuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.tar.gz
yuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.tar.bz2
yuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.tar.lz
yuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.tar.xz
yuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.tar.zst
yuzu-617eeb09e03f9f2727269c0424a05ee5678f32b9.zip
-rw-r--r--src/yuzu/debugger/wait_tree.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp
index 5a974d2a0..f391a41a9 100644
--- a/src/yuzu/debugger/wait_tree.cpp
+++ b/src/yuzu/debugger/wait_tree.cpp
@@ -37,8 +37,8 @@ constexpr std::array<std::array<Qt::GlobalColor, 2>, 10> WaitTreeColors{{
}};
bool IsDarkTheme() {
- const auto theme = UISettings::values.theme.toStdString();
- return theme == "qdarkstyle" || theme == "colorful_dark";
+ const auto& theme = UISettings::values.theme;
+ return theme == QStringLiteral("qdarkstyle") || theme == QStringLiteral("colorful_dark");
}
} // namespace
@@ -291,10 +291,7 @@ QString WaitTreeThread::GetText() const {
}
QColor WaitTreeThread::GetColor() const {
- std::size_t color_index = 0;
- if (IsDarkTheme()) {
- color_index = 1;
- }
+ const std::size_t color_index = IsDarkTheme() ? 1 : 0;
const auto& thread = static_cast<const Kernel::Thread&>(object);
switch (thread.GetStatus()) {