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

style selector is translatable now - made right

This commit is contained in:
agilob 2014-10-29 20:46:10 +00:00
parent 8197cc574c
commit 2fc9f12d80
No known key found for this signature in database
GPG Key ID: 2CACF3EEF598C663

View File

@ -52,8 +52,8 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
bodyUI->smileyPackBrowser->setCurrentIndex(bodyUI->smileyPackBrowser->findData(Settings::getInstance().getSmileyPack())); bodyUI->smileyPackBrowser->setCurrentIndex(bodyUI->smileyPackBrowser->findData(Settings::getInstance().getSmileyPack()));
reloadSmiles(); reloadSmiles();
bodyUI->styleBrowser->addItem(tr("None"));
bodyUI->styleBrowser->addItems(QStyleFactory::keys()); bodyUI->styleBrowser->addItems(QStyleFactory::keys());
bodyUI->styleBrowser->addItem("None");
if(QStyleFactory::keys().contains(Settings::getInstance().getStyle())) if(QStyleFactory::keys().contains(Settings::getInstance().getStyle()))
bodyUI->styleBrowser->setCurrentText(Settings::getInstance().getStyle()); bodyUI->styleBrowser->setCurrentText(Settings::getInstance().getStyle());
@ -127,7 +127,11 @@ void GeneralForm::onSetMinimizeToTray()
void GeneralForm::onStyleSelected(QString style) void GeneralForm::onStyleSelected(QString style)
{ {
if(bodyUI->styleBrowser->currentIndex() == 0)
Settings::getInstance().setStyle("None");
else
Settings::getInstance().setStyle(style); Settings::getInstance().setStyle(style);
this->setStyle(QStyleFactory::create(style)); this->setStyle(QStyleFactory::create(style));
parent->setBodyHeadStyle(style); parent->setBodyHeadStyle(style);
} }