Skip to content

Commit

Permalink
UI: Use theme path prefix in status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod authored and GeorgesStavracas committed Oct 10, 2023
1 parent a2db887 commit 625277a
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions UI/window-basic-status-bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 625277a

Please sign in to comment.