From 8661c833123d06e2b8229fa3609487996a57911d Mon Sep 17 00:00:00 2001 From: fourtf Date: Thu, 13 Aug 2020 17:36:45 +0200 Subject: [PATCH] updated descriptions in notification settings --- src/widgets/dialogs/SettingsDialog.cpp | 2 +- src/widgets/helper/CommonTexts.hpp | 2 +- .../settingspages/NotificationPage.cpp | 48 ++++++------------- 3 files changed, 16 insertions(+), 36 deletions(-) diff --git a/src/widgets/dialogs/SettingsDialog.cpp b/src/widgets/dialogs/SettingsDialog.cpp index f64656213..ba7b9ccbc 100644 --- a/src/widgets/dialogs/SettingsDialog.cpp +++ b/src/widgets/dialogs/SettingsDialog.cpp @@ -162,7 +162,7 @@ void SettingsDialog::addTabs() this->ui_.tabContainer->addSpacing(16); this->addTab([]{return new KeyboardSettingsPage;}, "Keybindings", ":/settings/keybinds.svg"); this->addTab([]{return new ModerationPage;}, "Moderation", ":/settings/moderation.svg", SettingsTabId::Moderation); - this->addTab([]{return new NotificationPage;}, "Notifications", ":/settings/notification2.svg"); + this->addTab([]{return new NotificationPage;}, "Live Notifications", ":/settings/notification2.svg"); this->addTab([]{return new ExternalToolsPage;}, "External tools", ":/settings/externaltools.svg"); this->ui_.tabContainer->addStretch(1); this->addTab([]{return new AboutPage;}, "About", ":/settings/about.svg", SettingsTabId(), Qt::AlignBottom); diff --git a/src/widgets/helper/CommonTexts.hpp b/src/widgets/helper/CommonTexts.hpp index 81b69a2c7..b78f89f03 100644 --- a/src/widgets/helper/CommonTexts.hpp +++ b/src/widgets/helper/CommonTexts.hpp @@ -1,6 +1,6 @@ #pragma once -#define OPEN_IN_BROWSER "Open in browser" +#define OPEN_IN_BROWSER "Open stream in browser" #define OPEN_PLAYER_IN_BROWSER "Open player in browser" #define OPEN_IN_STREAMLINK "Open in streamlink" #define DONT_OPEN "Don't open" diff --git a/src/widgets/settingspages/NotificationPage.cpp b/src/widgets/settingspages/NotificationPage.cpp index b14af27fc..e630c8d8f 100644 --- a/src/widgets/settingspages/NotificationPage.cpp +++ b/src/widgets/settingspages/NotificationPage.cpp @@ -29,18 +29,22 @@ NotificationPage::NotificationPage() { auto settings = tabs.appendTab(new QVBoxLayout, "Options"); { - settings.emplace("Enable for selected channels"); + settings.emplace("You can be informed when certain " + "channels go live. You can be " + "informed in multiple ways:"); + settings.append(this->createCheckBox( "Flash taskbar", getSettings()->notificationFlashTaskbar)); settings.append(this->createCheckBox( "Play sound", getSettings()->notificationPlaySound)); #ifdef Q_OS_WIN - settings.append( - this->createCheckBox("Enable toasts (Windows 8 or later)", - getSettings()->notificationToast)); + settings.append(this->createCheckBox( + "Show notification", getSettings()->notificationToast)); auto openIn = settings.emplace().withoutMargin(); { - openIn.emplace("Open stream from Toast: ") + openIn + .emplace( + "Action when clicking on a notification: ") ->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); @@ -77,8 +81,12 @@ NotificationPage::NotificationPage() settings->addStretch(1); } auto twitchChannels = - tabs.appendTab(new QVBoxLayout, "Channel going live"); + tabs.appendTab(new QVBoxLayout, "Selected Channels"); { + twitchChannels.emplace( + "These are the channels for which you will be informed " + "when they go live:"); + EditableModelView *view = twitchChannels .emplace( @@ -103,34 +111,6 @@ NotificationPage::NotificationPage() .append("channel"); }); } - /* - auto mixerChannels = tabs.appendTab(new QVBoxLayout, "Mixer"); - { - EditableModelView *view = - mixerChannels - .emplace( - getApp()->notifications->createModel( - nullptr, Platform::Mixer)) - .getElement(); - view->setTitles({"Mixer channels"}); - - view->getTableView()->horizontalHeader()->setSectionResizeMode( - QHeaderView::Fixed); - view->getTableView()->horizontalHeader()->setSectionResizeMode( - 0, QHeaderView::Stretch); - - QTimer::singleShot(1, [view] { - view->getTableView()->resizeColumnsToContents(); - view->getTableView()->setColumnWidth(0, 200); - }); - - view->addButtonPressed.connect([] { - getApp() - ->notifications->channelMap[Platform::Mixer] - .appendItem("channel"); - }); - } - */ } } }