mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
UI: Use theme path prefix in status bar
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
a2db8876fc
commit
625277ace3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user