diff --git a/conf-defs/fr_settings.confdef b/conf-defs/fr_settings.confdef
index e35b0daa..bf012a7c 100644
--- a/conf-defs/fr_settings.confdef
+++ b/conf-defs/fr_settings.confdef
@@ -432,7 +432,7 @@
Select the file with the primary style
StyleTheme
- styles
+ stylers
1
StyleTheme
diff --git a/src/gui/FRStyleManager.cpp b/src/gui/FRStyleManager.cpp
index 312a9de1..652647e6 100644
--- a/src/gui/FRStyleManager.cpp
+++ b/src/gui/FRStyleManager.cpp
@@ -37,6 +37,7 @@
#include "FRStyleManager.h"
+const wxString FRStyleManager::_DARKMODEDEFAULT = "DarkModeDefault";
FRStyleManager& stylerManager()
{
@@ -349,7 +350,7 @@ void FRStyleManager::loadConfig()
// user's explicit Preferences choice still wins.
const wxString systemDefault =
wxSystemSettings::GetAppearance().IsDark()
- ? wxString("DarkModeDefault")
+ ? _DARKMODEDEFAULT
: _default;
wxString fileName = config().get(_PRYMARY, systemDefault);
diff --git a/src/gui/FRStyleManager.h b/src/gui/FRStyleManager.h
index af82a6e9..ddb978fa 100644
--- a/src/gui/FRStyleManager.h
+++ b/src/gui/FRStyleManager.h
@@ -36,6 +36,8 @@ class FRStyleManager : public Subject
const wxString _SECONDARY = "StyleThemeSecondary";
const wxString _STYLEACTIVE = "StyleActive";
const wxString _default = "stylers";
+public:
+ static const wxString _DARKMODEDEFAULT;
wxFileName fileNamePrimaryM;
wxFileName fileNameSecondaryM;
diff --git a/src/gui/PreferencesDialogStyle.cpp b/src/gui/PreferencesDialogStyle.cpp
index 6ad86306..aec362dd 100644
--- a/src/gui/PreferencesDialogStyle.cpp
+++ b/src/gui/PreferencesDialogStyle.cpp
@@ -220,7 +220,10 @@ bool PrefDlgStyleSetting::loadFromTargetConfig(Config& config)
if (fileComboBoxM)
{
wxString value = defaultM;
- config.getValue(keyM, value);
+ // If system is dark and no value in config, use DarkModeDefault
+ if (!config.getValue(keyM, value) && wxSystemSettings::GetAppearance().IsDark())
+ value = FRStyleManager::_DARKMODEDEFAULT;
+
fileComboBoxM->SetValue(value);
loadStylers(fileComboBoxM->GetValue());
@@ -229,7 +232,8 @@ bool PrefDlgStyleSetting::loadFromTargetConfig(Config& config)
if (fileSecondaryComboBoxM)
{
wxString value = defaultM;
- config.getValue("StyleThemeSecondary", value);
+ if (!config.getValue("StyleThemeSecondary", value) && wxSystemSettings::GetAppearance().IsDark())
+ value = FRStyleManager::_DARKMODEDEFAULT;
fileSecondaryComboBoxM->SetValue(value);
}
diff --git a/xml-styles/stylers.xml b/xml-styles/stylers.xml
index b791dfb4..76448c0a 100644
--- a/xml-styles/stylers.xml
+++ b/xml-styles/stylers.xml
@@ -33,7 +33,7 @@
-
+