From 625277ace3c9cc6cf552b1f4aafd7febd0fe8ca5 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 22 Sep 2023 12:58:48 +0200 Subject: [PATCH] UI: Use theme path prefix in status bar --- UI/window-basic-status-bar.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/UI/window-basic-status-bar.cpp b/UI/window-basic-status-bar.cpp index 300b769c5..5f08ba78b 100644 --- a/UI/window-basic-status-bar.cpp +++ b/UI/window-basic-status-bar.cpp @@ -569,19 +569,9 @@ void OBSBasicStatusBar::RecordingUnpaused() static QPixmap GetPixmap(const QString &filename) { - bool darkTheme = obs_frontend_is_theme_dark(); - QString path; - - if (darkTheme) { - std::string darkPath; - QString themePath = QString("themes/Dark/") + filename; - GetDataFilePath(QT_TO_UTF8(themePath), darkPath); - path = QT_UTF8(darkPath.c_str()); - } else { - path = QString(":/res/images/" + filename); - } - - return QIcon(path).pixmap(QSize(16, 16)); + QString path = obs_frontend_is_theme_dark() ? "theme:Dark/" + : ":/res/images/"; + return QIcon(path + filename).pixmap(QSize(16, 16)); } void OBSBasicStatusBar::UpdateIcons()