mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
added descriptions to collection settings
This commit is contained in:
parent
e7b4527a0f
commit
f949605477
3 changed files with 19 additions and 9 deletions
|
@ -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>(
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue