mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt/Settings: Split setting of the user style into two functions.
This makes it so that if you just want to reload the current style (eg. on program start, or in response to a system event), you don't need to know the name of the currently selected user style. It's also more consistent with the way the 'userstyle/enabled' flag works.
This commit is contained in:
@ -240,9 +240,7 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters,
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this,
|
||||
[](Qt::ColorScheme colorScheme) {
|
||||
Settings::Instance().SetCurrentUserStyle(Settings::Instance().GetCurrentUserStyle());
|
||||
});
|
||||
[](Qt::ColorScheme colorScheme) { Settings::Instance().ApplyStyle(); });
|
||||
#endif
|
||||
|
||||
connect(m_cheats_manager, &CheatsManager::OpenGeneralSettings, this,
|
||||
@ -1739,7 +1737,7 @@ bool MainWindow::nativeEvent(const QByteArray& eventType, void* message, qintptr
|
||||
settings.UpdateSystemDark();
|
||||
if (settings.IsSystemDark() != was_dark_before)
|
||||
{
|
||||
settings.SetCurrentUserStyle(settings.GetCurrentUserStyle());
|
||||
settings.ApplyStyle();
|
||||
|
||||
// force the colors in the Skylander window to update
|
||||
if (m_skylander_window)
|
||||
|
Reference in New Issue
Block a user