added descriptions to collection settings

This commit is contained in:
fourtf 2019-08-26 14:36:06 +02:00
parent e7b4527a0f
commit f949605477
3 changed files with 19 additions and 9 deletions

View file

@ -44,8 +44,11 @@ HighlightingPage::HighlightingPage()
auto tabs = layout.emplace<QTabWidget>();
{
// HIGHLIGHTS
auto highlights = tabs.appendTab(new QVBoxLayout, "Phrases");
auto highlights = tabs.appendTab(new QVBoxLayout, "Messages");
{
highlights.emplace<QLabel>("Messages can be highlighted if "
"they match a certain pattern.");
EditableModelView *view =
highlights
.emplace<EditableModelView>(
@ -75,6 +78,8 @@ HighlightingPage::HighlightingPage()
auto pingUsers = tabs.appendTab(new QVBoxLayout, "Users");
{
pingUsers.emplace<QLabel>(
"Messages from a certain user can be highlighted.");
EditableModelView *view =
pingUsers
.emplace<EditableModelView>(
@ -106,6 +111,9 @@ HighlightingPage::HighlightingPage()
auto disabledUsers =
tabs.appendTab(new QVBoxLayout, "Excluded Users");
{
disabledUsers.emplace<QLabel>(
"This is a list of users (e.g. bots) whose messages should "
"<u>not</u> be highlighted.");
EditableModelView *view =
disabledUsers
.emplace<EditableModelView>(

View file

@ -19,7 +19,7 @@
#include <QVBoxLayout>
// clang-format off
#define INFO "/ignore <user> in chat ignores a user\n/unignore <user> in chat unignores a user"
#define INFO "/ignore <user> in chat ignores a user.\n/unignore <user> 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<QVBoxLayout>();
auto tabs = layout.emplace<QTabWidget>();
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<QLabel>(INFO);
label->setWordWrap(true);
label->setStyleSheet("color: #BBB");
}
void addPhrasesTab(LayoutCreator<QVBoxLayout> layout)
{
layout.emplace<QLabel>("Messages can be ignored if "
"they match a certain pattern.");
EditableModelView *view =
layout
.emplace<EditableModelView>(getApp()->ignores->createModel(nullptr))
@ -65,7 +63,7 @@ void addPhrasesTab(LayoutCreator<QVBoxLayout> 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<QVBoxLayout> layout)
void addUsersTab(IgnoresPage &page, LayoutCreator<QVBoxLayout> users,
QStringListModel &userModel)
{
auto label = users.emplace<QLabel>(INFO);
label->setWordWrap(true);
users.append(page.createCheckBox("Enable twitch ignored users",
getSettings()->enableTwitchIgnoredUsers));
@ -106,6 +106,7 @@ void addUsersTab(IgnoresPage &page, LayoutCreator<QVBoxLayout> users,
addremove->addStretch(1);
}*/
users.emplace<QLabel>("List of ignored users:");
users.emplace<QListView>()->setModel(&userModel);
}

View file

@ -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