From ab89ca2d8ebb641d7af2d5b1100eafe8bde759d4 Mon Sep 17 00:00:00 2001 From: Monsterovich Date: Mon, 22 Oct 2018 17:37:28 +0200 Subject: [PATCH] fix(ui): groupcolors fix1 --- src/persistence/settings.cpp | 8 ++++---- src/persistence/settings.h | 2 +- src/widget/form/settings/userinterfaceform.cpp | 4 ++-- src/widget/form/settings/userinterfaceform.h | 4 +--- src/widget/form/settings/userinterfacesettings.ui | 4 ++-- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/persistence/settings.cpp b/src/persistence/settings.cpp index 057f989c2..a4fc6136f 100644 --- a/src/persistence/settings.cpp +++ b/src/persistence/settings.cpp @@ -242,7 +242,7 @@ void Settings::loadGlobal() else style = "None"; } - groupNameColors = s.value("groupNameColors", false).toBool(); + nameColors = s.value("nameColors", false).toBool(); } s.endGroup(); @@ -548,7 +548,7 @@ void Settings::saveGlobal() s.setValue("useEmoticons", useEmoticons); s.setValue("themeColor", themeColor); s.setValue("style", style); - s.setValue("groupNameColors", groupNameColors); + s.setValue("nameColors", nameColors); s.setValue("statusChangeNotificationEnabled", statusChangeNotificationEnabled); s.setValue("spellCheckingEnabled", spellCheckingEnabled); } @@ -2422,12 +2422,12 @@ void Settings::setAutoLogin(bool state) void Settings::setEnableGroupChatsColor(bool state) { QMutexLocker locker{&bigLock}; - groupNameColors = state; + nameColors = state; } bool Settings::getEnableGroupChatsColor() const { - return groupNameColors; + return nameColors; } /** diff --git a/src/persistence/settings.h b/src/persistence/settings.h index 4a999adff..f38f7d3b1 100644 --- a/src/persistence/settings.h +++ b/src/persistence/settings.h @@ -608,7 +608,7 @@ private: bool notifySound; bool busySound; bool groupAlwaysNotify; - bool groupNameColors; + bool nameColors; bool forceTCP; bool enableLanDiscovery; diff --git a/src/widget/form/settings/userinterfaceform.cpp b/src/widget/form/settings/userinterfaceform.cpp index 71f674742..f2df8331b 100644 --- a/src/widget/form/settings/userinterfaceform.cpp +++ b/src/widget/form/settings/userinterfaceform.cpp @@ -73,7 +73,7 @@ UserInterfaceForm::UserInterfaceForm(SettingsWidget* myParent) bodyUI->txtChatFont->setCurrentFont(chatBaseFont); int index = static_cast(s.getStylePreference()); bodyUI->textStyleComboBox->setCurrentIndex(index); - bodyUI->gcColors->setChecked(s.getEnableGroupChatsColor()); + bodyUI->useNameColors->setChecked(s.getEnableGroupChatsColor()); bodyUI->notify->setChecked(s.getNotify()); // Note: UI is boolean inversed from settings to maintain setting file backwards compatibility @@ -376,7 +376,7 @@ void UserInterfaceForm::on_txtChatFontSize_valueChanged(int px) } } -void UserInterfaceForm::on_gcColors_stateChanged(int arg1) +void UserInterfaceForm::on_useNameColors_stateChanged(int arg1) { Settings::getInstance().setEnableGroupChatsColor(arg1); } diff --git a/src/widget/form/settings/userinterfaceform.h b/src/widget/form/settings/userinterfaceform.h index 16a179570..273101420 100644 --- a/src/widget/form/settings/userinterfaceform.h +++ b/src/widget/form/settings/userinterfaceform.h @@ -62,10 +62,8 @@ private slots: void on_txtChatFont_currentFontChanged(const QFont& f); void on_txtChatFontSize_valueChanged(int arg1); + void on_useNameColors_stateChanged(int arg1); - - void on_gcColors_stateChanged(int arg1); - private: void retranslateUi(); void reloadSmileys(); diff --git a/src/widget/form/settings/userinterfacesettings.ui b/src/widget/form/settings/userinterfacesettings.ui index bcdae0a77..48d98d94e 100644 --- a/src/widget/form/settings/userinterfacesettings.ui +++ b/src/widget/form/settings/userinterfacesettings.ui @@ -150,9 +150,9 @@ - + - Use colors in group chats + Use colored nicknames in chats