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

Merge branch 'pr575'

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-10-29 21:46:36 +01:00
commit b193aa8623
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

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);
} }