From be0971cd3aa9e55b1312e921fb5e08efe83a6eb7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 28 Jul 2024 14:02:37 +0200 Subject: [PATCH] Added a 'Dark with red' menu color scheme to improve perceived contrast on low-contrast displays --- es-app/src/guis/GuiMenu.cpp | 1 + es-app/src/views/ViewController.cpp | 37 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index fd3de964e..f2149134b 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -647,6 +647,7 @@ void GuiMenu::openUIOptions() getHelpStyle(), _("MENU COLOR SCHEME"), false); const std::string selectedMenuColor {Settings::getInstance()->getString("MenuColorScheme")}; menuColorScheme->add(_("DARK"), "dark", selectedMenuColor == "dark"); + menuColorScheme->add(_("DARK WITH RED"), "darkred", selectedMenuColor == "darkred"); menuColorScheme->add(_("LIGHT"), "light", selectedMenuColor == "light"); // If there are no objects returned, then there must be a manually modified entry in the // configuration file. Simply set the menu color scheme to "dark" in this case. diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 8e7aa28bb..9cf7b59fa 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -99,6 +99,43 @@ void ViewController::setMenuColors() mMenuColorDateTimeEditMarker = 0x00000022; mMenuColorDetectDeviceHeld = 0x44444400; } + else if (Settings::getInstance()->getString("MenuColorScheme") == "darkred") { + mMenuColorFrame = 0x191919FF; + mMenuColorFrameLaunchScreen = 0x121212FF; + mMenuColorFrameBusyComponent = 0x090909FF; + mMenuColorPanelDimmed = 0x00000024; + + mMenuColorTitle = 0x909090FF; + mMenuColorPrimary = 0x808080FF; + mMenuColorSecondary = 0x939393FF; + mMenuColorTertiary = 0x909090FF; + mMenuColorRed = 0xCA3E3EFF; + mMenuColorGreen = 0x449944FF; + mMenuColorBlue = 0x4757ddff; + + mMenuColorSelector = 0x461816FF; + mMenuColorSeparators = 0x303030FF; + mMenuColorBusyComponent = 0x888888FF; + mMenuColorScrollIndicators = 0x707070FF; + mMenuColorPopupText = 0xBBBBBBFF; + + mMenuColorButtonFocused = 0x050505FF; + mMenuColorButtonTextFocused = 0xAFAFAFFF; + mMenuColorButtonTextUnfocused = 0x808080FF; + mMenuColorButtonFlatFocused = 0x090909FF; + mMenuColorButtonFlatUnfocused = 0x242424FF; + + mMenuColorKeyboardModifier = 0xC62F2FFF; + mMenuColorKeyboardCursorFocused = 0xAAAAAAFF; + mMenuColorKeyboardCursorUnfocused = 0x666666FF; + mMenuColorKeyboardText = 0x92929200; + mMenuColorTextInputFrameFocused = 0x090909FF; + mMenuColorTextInputFrameUnfocused = 0x242424FF; + + mMenuColorSliderKnobDisabled = 0x393939FF; + mMenuColorDateTimeEditMarker = 0xFFFFFF22; + mMenuColorDetectDeviceHeld = 0x99999900; + } else { mMenuColorFrame = 0x191919FF; mMenuColorFrameLaunchScreen = 0x121212FF;