fixed messages not redrawing after changing theme

This commit is contained in:
fourtf 2017-12-19 01:54:51 +01:00
parent ded61256de
commit 4010c49c84
2 changed files with 7 additions and 1 deletions

View file

@ -51,11 +51,15 @@ float BaseWidget::getDpiMultiplier()
void BaseWidget::init()
{
this->colorScheme.updated.connect([this]() {
auto connection = this->colorScheme.updated.connect([this]() {
this->refreshTheme();
this->update();
});
QObject::connect(this, &QObject::destroyed, [connection] {
connection.disconnect(); //
});
}
void BaseWidget::initAsWindow()

View file

@ -290,6 +290,8 @@ QVBoxLayout *SettingsDialog::createAppearanceTab()
combo->setCurrentText(currentComboText);
QObject::connect(combo, &QComboBox::currentTextChanged, this, [](const QString &value) {
// dirty hack
EmoteManager::getInstance().incGeneration();
pajlada::Settings::Setting<std::string>::set("/appearance/theme/name",
value.toStdString());
});