removed functions from SettingsManager that shouldn't be there

This commit is contained in:
fourtf
2018-06-28 19:38:57 +02:00
parent b667183ca5
commit 5604ae6a67
75 changed files with 600 additions and 507 deletions
+5 -5
View File
@@ -226,7 +226,7 @@ QLayout *AppearancePage::createFontChanger()
button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Policy::Fixed);
QObject::connect(button, &QPushButton::clicked, [=]() {
QFontDialog dialog(app->fonts->getFont(chatterino::FontManager::ChatMedium, 1.));
QFontDialog dialog(app->fonts->getFont(FontManager::ChatMedium, 1.));
dialog.setWindowFlag(Qt::WindowStaysOnTopHint);
@@ -250,10 +250,10 @@ QLayout *AppearancePage::createUiScaleSlider()
layout->addWidget(slider);
layout->addWidget(label);
slider->setMinimum(chatterino::WindowManager::uiScaleMin);
slider->setMaximum(chatterino::WindowManager::uiScaleMax);
slider->setMinimum(WindowManager::uiScaleMin);
slider->setMaximum(WindowManager::uiScaleMax);
slider->setValue(
chatterino::WindowManager::clampUiScale(getApp()->settings->uiScale.getValue()));
WindowManager::clampUiScale(getApp()->settings->uiScale.getValue()));
label->setMinimumWidth(100);
@@ -262,7 +262,7 @@ QLayout *AppearancePage::createUiScaleSlider()
getApp()->settings->uiScale.connect(
[label](auto, auto) {
label->setText(QString::number(chatterino::WindowManager::getUiScaleValue()));
label->setText(QString::number(WindowManager::getUiScaleValue()));
},
this->connections_);
+1 -1
View File
@@ -7,7 +7,7 @@ namespace chatterino {
EmotesPage::EmotesPage()
: SettingsPage("Emotes", ":/images/emote.svg")
{
// chatterino::SettingManager &settings = chatterino::SettingManager::getInstance();
// SettingManager &settings = SettingManager::getInstance();
// LayoutCreator<EmotesPage> layoutCreator(this);
// auto layout = layoutCreator.emplace<QVBoxLayout>().withoutMargin();
+16 -15
View File
@@ -97,25 +97,26 @@ ModerationPage::ModerationPage()
// app->settings->timeoutAction));
// }
auto modButtons =
modMode.emplace<QGroupBox>("Custom moderator buttons").setLayoutType<QVBoxLayout>();
{
auto label2 =
modButtons.emplace<QLabel>("One action per line. {user} will be replaced with the "
"username.<br>Example `/timeout {user} 120`<br>");
label2->setWordWrap(true);
// auto modButtons =
// modMode.emplace<QGroupBox>("Custom moderator buttons").setLayoutType<QVBoxLayout>();
// {
// auto label2 =
// modButtons.emplace<QLabel>("One action per line. {user} will be replaced with the
// "
// "username.<br>Example `/timeout {user} 120`<br>");
// label2->setWordWrap(true);
auto text = modButtons.emplace<QTextEdit>().getElement();
// auto text = modButtons.emplace<QTextEdit>().getElement();
text->setPlainText(app->settings->moderationActions);
// text->setPlainText(app->moderationActions->items);
QObject::connect(text, &QTextEdit::textChanged, this,
[this] { this->itemsChangedTimer.start(200); });
// QObject::connect(text, &QTextEdit::textChanged, this,
// [this] { this->itemsChangedTimer.start(200); });
QObject::connect(&this->itemsChangedTimer, &QTimer::timeout, this, [text, app]() {
app->settings->moderationActions = text->toPlainText();
});
}
// QObject::connect(&this->itemsChangedTimer, &QTimer::timeout, this, [text, app]() {
// app->windows->moderationActions = text->toPlainText();
// });
// }
/*auto taggedUsers = tabs.appendTab(new QVBoxLayout, "Tagged users");
{