UI: Use icons from theme on Linux
This commit is contained in:
parent
f27a00d266
commit
2080051b9f
@ -1045,6 +1045,8 @@ OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)
|
||||
profilerNameStore(store)
|
||||
{
|
||||
sleepInhibitor = os_inhibit_sleep_create("OBS Video/audio");
|
||||
|
||||
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
|
||||
}
|
||||
|
||||
OBSApp::~OBSApp()
|
||||
|
@ -4977,7 +4977,8 @@ inline void OBSBasic::OnActivate()
|
||||
UpdateProcessPriority();
|
||||
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(QIcon(":/res/images/tray_active.png"));
|
||||
trayIcon->setIcon(QIcon::fromTheme("obs-tray-active",
|
||||
QIcon(":/res/images/tray_active.png")));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4990,7 +4991,8 @@ inline void OBSBasic::OnDeactivate()
|
||||
ClearProcessPriority();
|
||||
|
||||
if (trayIcon)
|
||||
trayIcon->setIcon(QIcon(":/res/images/obs.png"));
|
||||
trayIcon->setIcon(QIcon::fromTheme("obs-tray",
|
||||
QIcon(":/res/images/obs.png")));
|
||||
}
|
||||
}
|
||||
|
||||
@ -6639,8 +6641,8 @@ void OBSBasic::ToggleShowHide()
|
||||
|
||||
void OBSBasic::SystemTrayInit()
|
||||
{
|
||||
trayIcon.reset(new QSystemTrayIcon(QIcon(":/res/images/obs.png"),
|
||||
this));
|
||||
trayIcon.reset(new QSystemTrayIcon(QIcon::fromTheme("obs-tray",
|
||||
QIcon(":/res/images/obs.png")), this));
|
||||
trayIcon->setToolTip("OBS Studio");
|
||||
|
||||
showHide = new QAction(QTStr("Basic.SystemTray.Show"),
|
||||
|
@ -139,7 +139,8 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
|
||||
resize(800, 280);
|
||||
|
||||
setWindowTitle(QTStr("Basic.Stats"));
|
||||
setWindowIcon(QIcon(":/res/images/obs.png"));
|
||||
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
|
||||
|
||||
setWindowModality(Qt::NonModal);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
|
@ -30,7 +30,8 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
|
||||
type = type_;
|
||||
|
||||
if (isWindow) {
|
||||
setWindowIcon(QIcon(":/res/images/obs.png"));
|
||||
setWindowIcon(QIcon::fromTheme("obs",
|
||||
QIcon(":/res/images/obs.png")));
|
||||
|
||||
UpdateProjectorTitle(projectorTitle);
|
||||
windowedProjectors.push_back(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user