mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Match Windows taskbar state to tray icon
This adds both a status icon, and changes the color of the taskbar button itself.
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
#include <QAction>
|
||||
#include <QWidgetAction>
|
||||
#include <QSystemTrayIcon>
|
||||
#ifdef _WIN32
|
||||
#include <QWinTaskbarButton>
|
||||
#include <QWinTaskbarProgress>
|
||||
#endif
|
||||
#include <QStyledItemDelegate>
|
||||
#include <obs.hpp>
|
||||
#include <vector>
|
||||
@@ -272,6 +276,11 @@ private:
|
||||
QPointer<QMenu> perSceneTransitionMenu;
|
||||
QPointer<QObject> shortcutFilter;
|
||||
|
||||
#ifdef _WIN32
|
||||
QWinTaskbarButton *taskBtn = new QWinTaskbarButton(this);
|
||||
QWinTaskbarProgress *taskProg = taskBtn->progress();
|
||||
#endif
|
||||
|
||||
QPointer<QWidget> programWidget;
|
||||
QPointer<QVBoxLayout> programLayout;
|
||||
QPointer<QLabel> programLabel;
|
||||
|
||||
Reference in New Issue
Block a user