Apply Qt settings during runtime
It is no longer required to restart the application to change settings like the widget style and palette.
This commit is contained in:
parent
5a45a46450
commit
9566623651
|
@ -571,8 +571,9 @@ tweaking:
|
||||||
WindowsArguments = darkmode=1
|
WindowsArguments = darkmode=1
|
||||||
```
|
```
|
||||||
|
|
||||||
After changing these settings, restart Syncthing Tray. It is not sufficient to
|
When using Syncthing Tray 1.3.x or older, you need to restart Syncthing Tray for
|
||||||
close the last Windows; the process needs to be restarted.
|
these changes to have any effect. It is not sufficient to close the last window;
|
||||||
|
the process needs to be restarted.
|
||||||
|
|
||||||
Note that one can alternatively also enable Windows' "High contrast" setting which
|
Note that one can alternatively also enable Windows' "High contrast" setting which
|
||||||
seems to bring back the traditional theming/coloring (which has normally been
|
seems to bring back the traditional theming/coloring (which has normally been
|
||||||
|
|
|
@ -220,6 +220,7 @@ int runApplication(int argc, const char *const *argv)
|
||||||
QObject::connect(&singleInstance, &SingleInstance::newInstance, &runApplication);
|
QObject::connect(&singleInstance, &SingleInstance::newInstance, &runApplication);
|
||||||
Settings::restore();
|
Settings::restore();
|
||||||
auto &settings = Settings::values();
|
auto &settings = Settings::values();
|
||||||
|
settings.qt.disableNotices();
|
||||||
settings.qt.apply();
|
settings.qt.apply();
|
||||||
qtConfigArgs.applySettings(true);
|
qtConfigArgs.applySettings(true);
|
||||||
if (assumeFirstLaunchArg.isPresent()) {
|
if (assumeFirstLaunchArg.isPresent()) {
|
||||||
|
|
|
@ -631,6 +631,7 @@ bool TrayWidget::event(QEvent *event)
|
||||||
|
|
||||||
void TrayWidget::applySettingsOnAllInstances()
|
void TrayWidget::applySettingsOnAllInstances()
|
||||||
{
|
{
|
||||||
|
Settings::values().qt.apply();
|
||||||
for (TrayWidget *instance : s_instances) {
|
for (TrayWidget *instance : s_instances) {
|
||||||
instance->applySettings();
|
instance->applySettings();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue