1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(ui): groupcolors fix1

This commit is contained in:
Monsterovich 2018-10-22 17:37:28 +02:00
parent aaf5229ece
commit ab89ca2d8e
5 changed files with 10 additions and 12 deletions

View File

@ -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;
}
/**

View File

@ -608,7 +608,7 @@ private:
bool notifySound;
bool busySound;
bool groupAlwaysNotify;
bool groupNameColors;
bool nameColors;
bool forceTCP;
bool enableLanDiscovery;

View File

@ -73,7 +73,7 @@ UserInterfaceForm::UserInterfaceForm(SettingsWidget* myParent)
bodyUI->txtChatFont->setCurrentFont(chatBaseFont);
int index = static_cast<int>(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);
}

View File

@ -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();

View File

@ -150,9 +150,9 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="gcColors">
<widget class="QCheckBox" name="useNameColors">
<property name="text">
<string>Use colors in group chats</string>
<string>Use colored nicknames in chats</string>
</property>
</widget>
</item>