From f94960547704a6be9b73d76ea533a8c0b866bd6f Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 26 Aug 2019 14:36:06 +0200 Subject: [PATCH] added descriptions to collection settings --- src/widgets/settingspages/HighlightingPage.cpp | 10 +++++++++- src/widgets/settingspages/IgnoresPage.cpp | 15 ++++++++------- src/widgets/settingspages/NotificationPage.cpp | 3 ++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/widgets/settingspages/HighlightingPage.cpp b/src/widgets/settingspages/HighlightingPage.cpp index 66c3aeb55..ec970e2dc 100644 --- a/src/widgets/settingspages/HighlightingPage.cpp +++ b/src/widgets/settingspages/HighlightingPage.cpp @@ -44,8 +44,11 @@ HighlightingPage::HighlightingPage() auto tabs = layout.emplace(); { // HIGHLIGHTS - auto highlights = tabs.appendTab(new QVBoxLayout, "Phrases"); + auto highlights = tabs.appendTab(new QVBoxLayout, "Messages"); { + highlights.emplace("Messages can be highlighted if " + "they match a certain pattern."); + EditableModelView *view = highlights .emplace( @@ -75,6 +78,8 @@ HighlightingPage::HighlightingPage() auto pingUsers = tabs.appendTab(new QVBoxLayout, "Users"); { + pingUsers.emplace( + "Messages from a certain user can be highlighted."); EditableModelView *view = pingUsers .emplace( @@ -106,6 +111,9 @@ HighlightingPage::HighlightingPage() auto disabledUsers = tabs.appendTab(new QVBoxLayout, "Excluded Users"); { + disabledUsers.emplace( + "This is a list of users (e.g. bots) whose messages should " + "not be highlighted."); EditableModelView *view = disabledUsers .emplace( diff --git a/src/widgets/settingspages/IgnoresPage.cpp b/src/widgets/settingspages/IgnoresPage.cpp index 8b0981e01..36c5f7877 100644 --- a/src/widgets/settingspages/IgnoresPage.cpp +++ b/src/widgets/settingspages/IgnoresPage.cpp @@ -19,7 +19,7 @@ #include // clang-format off -#define INFO "/ignore in chat ignores a user\n/unignore in chat unignores a user" +#define INFO "/ignore in chat ignores a user.\n/unignore in chat unignores a user.\nYou can also click on a user to open the usercard." // clang-format on namespace chatterino { @@ -35,17 +35,15 @@ IgnoresPage::IgnoresPage() auto layout = layoutCreator.setLayoutType(); auto tabs = layout.emplace(); - addPhrasesTab(tabs.appendTab(new QVBoxLayout, "Phrases")); + addPhrasesTab(tabs.appendTab(new QVBoxLayout, "Messages")); addUsersTab(*this, tabs.appendTab(new QVBoxLayout, "Users"), this->userListModel_); - - auto label = layout.emplace(INFO); - label->setWordWrap(true); - label->setStyleSheet("color: #BBB"); } void addPhrasesTab(LayoutCreator layout) { + layout.emplace("Messages can be ignored if " + "they match a certain pattern."); EditableModelView *view = layout .emplace(getApp()->ignores->createModel(nullptr)) @@ -65,7 +63,7 @@ void addPhrasesTab(LayoutCreator layout) view->addButtonPressed.connect([] { getApp()->ignores->phrases.appendItem( - IgnorePhrase{"my phrase", false, false, + IgnorePhrase{"my pattern", false, false, getSettings()->ignoredPhraseReplace.getValue(), true}); }); } @@ -73,6 +71,8 @@ void addPhrasesTab(LayoutCreator layout) void addUsersTab(IgnoresPage &page, LayoutCreator users, QStringListModel &userModel) { + auto label = users.emplace(INFO); + label->setWordWrap(true); users.append(page.createCheckBox("Enable twitch ignored users", getSettings()->enableTwitchIgnoredUsers)); @@ -106,6 +106,7 @@ void addUsersTab(IgnoresPage &page, LayoutCreator users, addremove->addStretch(1); }*/ + users.emplace("List of ignored users:"); users.emplace()->setModel(&userModel); } diff --git a/src/widgets/settingspages/NotificationPage.cpp b/src/widgets/settingspages/NotificationPage.cpp index 74510f90c..06acf44d9 100644 --- a/src/widgets/settingspages/NotificationPage.cpp +++ b/src/widgets/settingspages/NotificationPage.cpp @@ -77,7 +77,8 @@ NotificationPage::NotificationPage() settings->addStretch(1); } - auto twitchChannels = tabs.appendTab(new QVBoxLayout, "Twitch"); + auto twitchChannels = + tabs.appendTab(new QVBoxLayout, "Channel going live"); { EditableModelView *view = twitchChannels