From c6c884df70adce4dc527d27143463522f049efe2 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Sat, 27 May 2023 10:38:25 +0000 Subject: [PATCH] Add an indicator in the title bar if Streamer Mode is active (#4410) --- CHANGELOG.md | 1 + resources/buttons/streamerModeEnabledDark.png | Bin 0 -> 3574 bytes resources/buttons/streamerModeEnabledDark.svg | 13 +++++ .../buttons/streamerModeEnabledLight.png | Bin 0 -> 3528 bytes .../buttons/streamerModeEnabledLight.svg | 13 +++++ src/Application.hpp | 4 ++ src/singletons/Settings.cpp | 6 +++ src/util/StreamerMode.cpp | 4 ++ src/widgets/Notebook.cpp | 41 ++++++++++++++++ src/widgets/Notebook.hpp | 6 +++ src/widgets/Window.cpp | 46 ++++++++++++++++++ src/widgets/Window.hpp | 5 ++ src/widgets/dialogs/SettingsDialog.cpp | 17 ++++++- src/widgets/dialogs/SettingsDialog.hpp | 2 + src/widgets/helper/SettingsDialogTab.hpp | 1 + src/widgets/helper/TitlebarButton.hpp | 3 +- src/widgets/settingspages/AboutPage.cpp | 3 ++ 17 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 resources/buttons/streamerModeEnabledDark.png create mode 100644 resources/buttons/streamerModeEnabledDark.svg create mode 100644 resources/buttons/streamerModeEnabledLight.png create mode 100644 resources/buttons/streamerModeEnabledLight.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index be24b4f96ef..7085d62d222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unversioned +- Minor: Add an icon showing when streamer mode is enabled (#4410) - Minor: Added `/shoutout ` commands to shoutout specified user. (#4638) - Dev: Added command to set Qt's logging filter/rules at runtime (`/c2-set-logging-rules`). (#4637) - Dev: Added the ability to see & load custom themes from the Themes directory. No stable promises are made of this feature, changes might be made that breaks custom themes without notice. (#4570) diff --git a/resources/buttons/streamerModeEnabledDark.png b/resources/buttons/streamerModeEnabledDark.png new file mode 100644 index 0000000000000000000000000000000000000000..7ab2b1d8b3fc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wiwy_a7X^Q7J6`B=^#LxyDL(+X>_P|FYY^+wBrpZ^s6JKCl^0Y49ZV=!G{ z{;Tq$Ly8|3`+eBnSSz(52xL-!_jIz9MMx6!rLFe1-sA}I&64SvcW>eX)9z)1m3V4Y zdbJu;qkBO&y)l z8_ds#b^3uG!L(D~_nkoBR#z19ups82abpReOM2_*NWo!@6(vFGHeHYrS5p^i4+iCA zMWM7f5&G#Y9iZbNL3?>-hZ zDaTyyoH5t6ko=->4f?yYZxC($s5r=P?i7kFtYT65me=t0rfo@QODR}ya}CM5dZNQN z1VK~?sn}}dv!%mBe#nenH@A4nipDhk5iLGqOt1bFO5hO~ZJ^DYA^IO@4{f)?*51gy?v(sH6QRX#cTlKGNTOI^`Qm}dS_vjuc^`u4J zrYE*RQxl^S%Pr4oH^nS_^qZw{L^7%X@Z_P&ObI}f7&2&0Z zp0zGhVFO~{?2)&3Ytkyuc=v!>h)z#DUcf@lq zRy)@7#I1P4^xcb4go5(0{>Xcr^H#og?Sx+_s|MoIdUILRB7j2DjQ + + + + + + diff --git a/resources/buttons/streamerModeEnabledLight.png b/resources/buttons/streamerModeEnabledLight.png new file mode 100644 index 0000000000000000000000000000000000000000..8da207f7959de50f077e683f11cf63f524028431 GIT binary patch literal 3528 zcmai1S5VW7)BS}2hF(NENC!cYqVxb#f}r%?Nr(gx>6p-qq4$n-gbOMl(tD9!q)Q7% zK$IpWBB5N`=Y9QN{tst&&g{(Y!_MqE8*8AaMMKF>2><|%_G1mBzuDnGK*;~b?>T5W z006nWsH+>eI64A=NUC3|;uG*ArpRsq9Swel27}r~zBo-%L;5F)nz=l@FbUW6Du0Oo z-F6B_H!_a+ut?|iO2Tbtu|-ix1YgYJ(z&ZZ6`GNkZ{%+M$@=H~F?{_h^)q7roD8@% zXgYxuj5Bhx^y&VN1n4@C`u)aoXrk2{Z0t|uOgcG?JFQlpx3$fuWzi?k zlq9|>!DzMUPxdchld+fO)FMIEM;Zn8OclQ_N){7f8$Is=T(?#7Px}G}K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(v5pqUzZd%pUs@=#gA%-&ZRe%QUK^H`$^skvPN9(NBe?}W zN4;kZT=I3{>{3w!jnZRZoXG*VL{gsg3ckX=Fcj&9qEuuH_uTf_ybj9o03RT=9|c8? z52wz3YiXPoxhr)1G9?37+ip0L$6E;WXJEkemGpJ)tkOjxeR-Dhbu+O+RaUWh8ZMH^ zD<{B$2h0vAhIO1!FqZQSR5q zoudSxUak1sehV7|sFFoSfqlZSeQKFEnczrGTt`$Gmk^gK`g!w;K^Q{KE#BV)gkkTk`9AWvXcXEGZ-+cCfAF}NV0ecbZjaIfjTG0<8 zLG%iqJI)vPUUGTG-1WYpr7BF9^R_r`k1mxu}IfemG>!o6^gwWLr>HL6T?HsudHafCrSHAKu%@uW{stJy~vJ}WgT3@+_1_#bFj`?eAt#Mjhu_5jzS#& zr$G*bBI?(d2IHBrATm+=*;*npf2*o%X%&%KT2N57Q@Ew8{gwfC9m>ubGm`*j4`u% zj32sC3lgXr8DuKA=Dy70=~vTj^9L7$seCBm*0_$3bMCn&ff;VES;8AQ;x8GEg#5!& zU%qQ6{h^$$LUFlbycBvSY=jAoWLQnJR=%sx=s`9W3r z{@Yf9?Zb}Ol%sye9bE8Zh_hkwn0{^Logpb*TS@jjH{EDe4nFGMuOKiYH7T=Aw5sTM7U`{71WcH`{~w zQJ&*IZvJsp7BpzK9f>c`iWETXnhIxE7i#s$?0rsDC`z@Wq)i$ag+ecc_<}4_<*SSA0GPu8E(Q6 cYBe + + + + + + diff --git a/src/Application.hpp b/src/Application.hpp index 27f1c2f60fb..6917190bdfa 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -3,6 +3,8 @@ #include "common/Singleton.hpp" #include "singletons/NativeMessaging.hpp" +#include +#include #include #include @@ -153,6 +155,8 @@ class Application : public IApplication } IUserDataController *getUserData() override; + pajlada::Signals::NoArgSignal streamerModeChanged; + private: void addSingleton(Singleton *singleton); void initPubSub(); diff --git a/src/singletons/Settings.cpp b/src/singletons/Settings.cpp index b32623c428a..07e10142c06 100644 --- a/src/singletons/Settings.cpp +++ b/src/singletons/Settings.cpp @@ -1,5 +1,6 @@ #include "singletons/Settings.hpp" +#include "Application.hpp" #include "controllers/filters/FilterRecord.hpp" #include "controllers/highlights/HighlightBadge.hpp" #include "controllers/highlights/HighlightBlacklistUser.hpp" @@ -136,6 +137,11 @@ Settings::Settings(const QString &settingsDirectory) }, false); #endif + this->enableStreamerMode.connect( + []() { + getApp()->streamerModeChanged.invoke(); + }, + false); } Settings &Settings::instance() diff --git a/src/util/StreamerMode.cpp b/src/util/StreamerMode.cpp index 03f3f59aae8..c905b88a03a 100644 --- a/src/util/StreamerMode.cpp +++ b/src/util/StreamerMode.cpp @@ -71,6 +71,7 @@ bool isInStreamerMode() p.exitStatus() == QProcess::NormalExit) { cache = (p.exitCode() == 0); + getApp()->streamerModeChanged.invoke(); return (p.exitCode() == 0); } @@ -89,6 +90,7 @@ bool isInStreamerMode() qCWarning(chatterinoStreamerMode) << "pgrep execution timed out!"; cache = false; + getApp()->streamerModeChanged.invoke(); return false; #endif @@ -122,6 +124,7 @@ bool isInStreamerMode() if (broadcastingBinaries().contains(processName)) { cache = true; + getApp()->streamerModeChanged.invoke(); return true; } } @@ -133,6 +136,7 @@ bool isInStreamerMode() } cache = false; + getApp()->streamerModeChanged.invoke(); #endif return false; } diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index 3f9a9c67bfc..40a9237a24e 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -4,10 +4,12 @@ #include "common/QLogging.hpp" #include "controllers/hotkeys/HotkeyCategory.hpp" #include "controllers/hotkeys/HotkeyController.hpp" +#include "singletons/Resources.hpp" #include "singletons/Settings.hpp" #include "singletons/Theme.hpp" #include "singletons/WindowManager.hpp" #include "util/InitUpdateButton.hpp" +#include "util/StreamerMode.hpp" #include "widgets/dialogs/SettingsDialog.hpp" #include "widgets/helper/ChannelView.hpp" #include "widgets/helper/NotebookButton.hpp" @@ -1155,6 +1157,45 @@ void SplitNotebook::addCustomButtons() auto updateBtn = this->addCustomButton(); initUpdateButton(*updateBtn, this->signalHolder_); + + // streamer mode + this->streamerModeIcon_ = this->addCustomButton(); + QObject::connect(this->streamerModeIcon_, &NotebookButton::leftClicked, + [this] { + getApp()->windows->showSettingsDialog( + this, SettingsDialogPreference::StreamerMode); + }); + this->signalHolder_.managedConnect(getApp()->streamerModeChanged, [this]() { + this->updateStreamerModeIcon(); + }); + this->updateStreamerModeIcon(); +} + +void SplitNotebook::updateStreamerModeIcon() +{ + if (this->streamerModeIcon_ == nullptr) + { + return; + } + // A duplicate of this code is in Window class + // That copy handles the TitleBar icon in Window (main window on Windows) + // This one is the one near splits (on linux and mac or non-main windows on Windows) + if (getTheme()->isLightTheme()) + { + this->streamerModeIcon_->setPixmap( + getResources().buttons.streamerModeEnabledLight); + } + else + { + this->streamerModeIcon_->setPixmap( + getResources().buttons.streamerModeEnabledDark); + } + this->streamerModeIcon_->setVisible(isInStreamerMode()); +} + +void SplitNotebook::themeChangedEvent() +{ + this->updateStreamerModeIcon(); } SplitContainer *SplitNotebook::addPage(bool select) diff --git a/src/widgets/Notebook.hpp b/src/widgets/Notebook.hpp index 7cc49cfa67b..382b260ec54 100644 --- a/src/widgets/Notebook.hpp +++ b/src/widgets/Notebook.hpp @@ -123,6 +123,7 @@ class SplitNotebook : public Notebook SplitContainer *addPage(bool select = false); SplitContainer *getOrAddSelectedPage(); void select(QWidget *page, bool focusPage = true) override; + void themeChangedEvent() override; protected: void showEvent(QShowEvent *event) override; @@ -131,6 +132,11 @@ class SplitNotebook : public Notebook void addCustomButtons(); pajlada::Signals::SignalHolder signalHolder_; + + // Main window on Windows has basically a duplicate of this in Window + NotebookButton *streamerModeIcon_{}; + + void updateStreamerModeIcon(); }; } // namespace chatterino diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index dfac8ba6ecc..12f605838ed 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -9,6 +9,7 @@ #include "controllers/hotkeys/HotkeyController.hpp" #include "providers/twitch/TwitchAccount.hpp" #include "providers/twitch/TwitchIrcServer.hpp" +#include "singletons/Resources.hpp" #include "singletons/Settings.hpp" #include "singletons/Theme.hpp" #include "singletons/Updates.hpp" @@ -186,6 +187,51 @@ void Window::addCustomTitlebarButtons() this->userLabel_->rect().bottomLeft())); }); this->userLabel_->setMinimumWidth(20 * scale()); + + // streamer mode + this->streamerModeTitlebarIcon_ = + this->addTitleBarButton(TitleBarButtonStyle::StreamerMode, [this] { + getApp()->windows->showSettingsDialog( + this, SettingsDialogPreference::StreamerMode); + }); + this->signalHolder_.managedConnect(getApp()->streamerModeChanged, [this]() { + this->updateStreamerModeIcon(); + }); +} + +void Window::updateStreamerModeIcon() +{ + // A duplicate of this code is in SplitNotebook class (in Notebook.{c,h}pp) + // That one is the one near splits (on linux and mac or non-main windows on Windows) + // This copy handles the TitleBar icon in Window (main window on Windows) + if (this->streamerModeTitlebarIcon_ == nullptr) + { + return; + } +#ifdef Q_OS_WIN + assert(this->getType() == WindowType::Main); + if (getTheme()->isLightTheme()) + { + this->streamerModeTitlebarIcon_->setPixmap( + getResources().buttons.streamerModeEnabledLight); + } + else + { + this->streamerModeTitlebarIcon_->setPixmap( + getResources().buttons.streamerModeEnabledDark); + } + this->streamerModeTitlebarIcon_->setVisible(isInStreamerMode()); +#else + // clang-format off + assert(false && "Streamer mode TitleBar icon should not exist on non-Windows OSes"); + // clang-format on +#endif +} + +void Window::themeChangedEvent() +{ + this->updateStreamerModeIcon(); + BaseWindow::themeChangedEvent(); } void Window::addDebugStuff(HotkeyController::HotkeyMap &actions) diff --git a/src/widgets/Window.hpp b/src/widgets/Window.hpp index d9974759172..6d25d875c5a 100644 --- a/src/widgets/Window.hpp +++ b/src/widgets/Window.hpp @@ -31,6 +31,7 @@ class Window : public BaseWindow protected: void closeEvent(QCloseEvent *event) override; bool event(QEvent *event) override; + void themeChangedEvent() override; private: void addCustomTitlebarButtons(); @@ -51,6 +52,10 @@ class Window : public BaseWindow pajlada::Signals::SignalHolder signalHolder_; std::vector bSignals_; + // this is only used on Windows and only on the main window, for the one used otherwise, see SplitNotebook in Notebook.hpp + TitleBarButton *streamerModeTitlebarIcon_ = nullptr; + void updateStreamerModeIcon(); + friend class Notebook; }; diff --git a/src/widgets/dialogs/SettingsDialog.cpp b/src/widgets/dialogs/SettingsDialog.cpp index 5bd218860af..1ee94b4cfea 100644 --- a/src/widgets/dialogs/SettingsDialog.cpp +++ b/src/widgets/dialogs/SettingsDialog.cpp @@ -195,6 +195,11 @@ void SettingsDialog::filterElements(const QString &text) } } +void SettingsDialog::setElementFilter(const QString &query) +{ + this->ui_.search->setText(query); +} + void SettingsDialog::addTabs() { this->ui_.tabContainer->setSpacing(0); @@ -203,7 +208,7 @@ void SettingsDialog::addTabs() // Constructors are wrapped in std::function to remove some strain from first time loading. // clang-format off - this->addTab([]{return new GeneralPage;}, "General", ":/settings/about.svg"); + this->addTab([]{return new GeneralPage;}, "General", ":/settings/about.svg", SettingsTabId::General); this->ui_.tabContainer->addSpacing(16); this->addTab([]{return new AccountsPage;}, "Accounts", ":/settings/accounts.svg", SettingsTabId::Accounts); this->addTab([]{return new NicknamesPage;}, "Nicknames", ":/settings/accounts.svg"); @@ -316,10 +321,20 @@ void SettingsDialog::showDialog(QWidget *parent, } break; + case SettingsDialogPreference::StreamerMode: { + instance->selectTab(SettingsTabId::General); + } + break; + default:; } instance->show(); + if (preferredTab == SettingsDialogPreference::StreamerMode) + { + // this is needed because each time the settings are opened, the query is reset + instance->setElementFilter("Streamer Mode"); + } instance->activateWindow(); instance->raise(); instance->setFocus(); diff --git a/src/widgets/dialogs/SettingsDialog.hpp b/src/widgets/dialogs/SettingsDialog.hpp index ad8f873d387..303842af21a 100644 --- a/src/widgets/dialogs/SettingsDialog.hpp +++ b/src/widgets/dialogs/SettingsDialog.hpp @@ -27,6 +27,7 @@ class PageHeader : public QFrame enum class SettingsDialogPreference { NoPreference, + StreamerMode, Accounts, ModerationActions, }; @@ -57,6 +58,7 @@ class SettingsDialog : public BaseWindow void selectTab(SettingsDialogTab *tab, const bool byUser = true); void selectTab(SettingsTabId id); void filterElements(const QString &query); + void setElementFilter(const QString &query); void onOkClicked(); void onCancelClicked(); diff --git a/src/widgets/helper/SettingsDialogTab.hpp b/src/widgets/helper/SettingsDialogTab.hpp index 1c907ad459d..921d157f7ab 100644 --- a/src/widgets/helper/SettingsDialogTab.hpp +++ b/src/widgets/helper/SettingsDialogTab.hpp @@ -15,6 +15,7 @@ class SettingsDialog; enum class SettingsTabId { None, + General, Accounts, Moderation, }; diff --git a/src/widgets/helper/TitlebarButton.hpp b/src/widgets/helper/TitlebarButton.hpp index 85e435005bb..46358237027 100644 --- a/src/widgets/helper/TitlebarButton.hpp +++ b/src/widgets/helper/TitlebarButton.hpp @@ -11,7 +11,8 @@ enum class TitleBarButtonStyle { Unmaximize = 4, Close = 8, User = 16, - Settings = 32 + Settings = 32, + StreamerMode = 64, }; class TitleBarButton : public Button diff --git a/src/widgets/settingspages/AboutPage.cpp b/src/widgets/settingspages/AboutPage.cpp index 05037621e6d..9ea3153b920 100644 --- a/src/widgets/settingspages/AboutPage.cpp +++ b/src/widgets/settingspages/AboutPage.cpp @@ -126,6 +126,9 @@ AboutPage::AboutPage() "https://github.com/getsentry/crashpad", ":/licenses/crashpad.txt"); #endif + addLicense(form.getElement(), "Fluent icons", + "https://github.com/microsoft/fluentui-system-icons", + ":/licenses/fluenticons.txt"); } // Attributions