mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-26 22:00:01 +03:00
Implementation for "Light/dark theme should follow system default" (issue SpartanJ/ecode#754).
This commit is contained in:
@@ -136,9 +136,8 @@ void AppConfig::load( const std::string& confPath, std::string& keybindingsPath,
|
||||
ui.fallbackFont = ini.getValue( "ui", "fallback_font", "fonts/DroidSansFallbackFull.ttf" );
|
||||
ui.theme = ini.getValue( "ui", "theme" );
|
||||
ui.language = ini.getValue( "ui", "language" );
|
||||
ui.colorScheme = ini.getValue( "ui", "ui_color_scheme", "dark" ) == "light"
|
||||
? ColorSchemePreference::Light
|
||||
: ColorSchemePreference::Dark;
|
||||
ui.colorScheme =
|
||||
ColorSchemePreferences::fromStringExt( ini.getValue( "ui", "ui_color_scheme", "system" ) );
|
||||
ui.fontHinting =
|
||||
FontTrueType::fontHintingFromString( ini.getValue( "ui", "font_hinting", "full" ) );
|
||||
ui.fontAntialiasing = FontTrueType::fontAntialiasingFromString(
|
||||
@@ -335,9 +334,7 @@ void AppConfig::save( const std::vector<std::string>& recentFiles,
|
||||
ini.setValue( "ui", "theme", ui.theme );
|
||||
ini.setValue( "ui", "language", ui.language );
|
||||
ini.setValue( "ui", "fallback_font", ui.fallbackFont );
|
||||
ini.setValue(
|
||||
"ui", "ui_color_scheme",
|
||||
std::string_view{ ui.colorScheme == ColorSchemePreference::Light ? "light" : "dark" } );
|
||||
ini.setValue( "ui", "ui_color_scheme", ColorSchemePreferences::toString( ui.colorScheme ) );
|
||||
ini.setValue( "ui", "font_hinting", FontTrueType::fontHintingToString( ui.fontHinting ) );
|
||||
ini.setValue( "ui", "font_antialiasing",
|
||||
FontTrueType::fontAntialiasingToString( ui.fontAntialiasing ) );
|
||||
|
||||
Reference in New Issue
Block a user