fixed messages not redrawing after changing theme
This commit is contained in:
@@ -51,11 +51,15 @@ float BaseWidget::getDpiMultiplier()
|
|||||||
|
|
||||||
void BaseWidget::init()
|
void BaseWidget::init()
|
||||||
{
|
{
|
||||||
this->colorScheme.updated.connect([this]() {
|
auto connection = this->colorScheme.updated.connect([this]() {
|
||||||
this->refreshTheme();
|
this->refreshTheme();
|
||||||
|
|
||||||
this->update();
|
this->update();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QObject::connect(this, &QObject::destroyed, [connection] {
|
||||||
|
connection.disconnect(); //
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseWidget::initAsWindow()
|
void BaseWidget::initAsWindow()
|
||||||
|
|||||||
@@ -290,6 +290,8 @@ QVBoxLayout *SettingsDialog::createAppearanceTab()
|
|||||||
combo->setCurrentText(currentComboText);
|
combo->setCurrentText(currentComboText);
|
||||||
|
|
||||||
QObject::connect(combo, &QComboBox::currentTextChanged, this, [](const QString &value) {
|
QObject::connect(combo, &QComboBox::currentTextChanged, this, [](const QString &value) {
|
||||||
|
// dirty hack
|
||||||
|
EmoteManager::getInstance().incGeneration();
|
||||||
pajlada::Settings::Setting<std::string>::set("/appearance/theme/name",
|
pajlada::Settings::Setting<std::string>::set("/appearance/theme/name",
|
||||||
value.toStdString());
|
value.toStdString());
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user