From 954492b1f435d9f99330b6b02c41cb9fdfdc63e2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 13 Jul 2023 17:46:06 +0200 Subject: [PATCH] Some more changes to make the dark menu color scheme the default choice --- es-app/src/views/ViewController.cpp | 76 ++++++++++++------------ es-core/src/Window.cpp | 6 +- es-core/src/components/ComponentList.cpp | 2 +- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 5ed960efb..500054e18 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -62,44 +62,7 @@ ViewController* ViewController::getInstance() void ViewController::setMenuColors() { - if (Settings::getInstance()->getString("MenuColorScheme") == "dark") { - mMenuColorFrame = 0x191919FF; - mMenuColorFrameLaunchScreen = 0x121212FF; - mMenuColorFrameBusyComponent = 0x090909FF; - mMenuColorPanelDimmed = 0x00000024; - - mMenuColorTitle = 0x909090FF; - mMenuColorPrimary = 0x808080FF; - mMenuColorSecondary = 0x939393FF; - mMenuColorTertiary = 0x909090FF; - mMenuColorRed = 0xCA3E3EFF; - mMenuColorGreen = 0x449944FF; - mMenuColorBlue = 0x4757ddff; - - mMenuColorSelector = 0x000000FF; - 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 { + if (Settings::getInstance()->getString("MenuColorScheme") == "light") { mMenuColorFrame = 0xEFEFEFFF; mMenuColorFrameLaunchScreen = 0xDFDFDFFF; mMenuColorFrameBusyComponent = 0xFFFFFFFF; @@ -136,6 +99,43 @@ void ViewController::setMenuColors() mMenuColorDateTimeEditMarker = 0x00000022; mMenuColorDetectDeviceHeld = 0x44444400; } + else { + mMenuColorFrame = 0x191919FF; + mMenuColorFrameLaunchScreen = 0x121212FF; + mMenuColorFrameBusyComponent = 0x090909FF; + mMenuColorPanelDimmed = 0x00000024; + + mMenuColorTitle = 0x909090FF; + mMenuColorPrimary = 0x808080FF; + mMenuColorSecondary = 0x939393FF; + mMenuColorTertiary = 0x909090FF; + mMenuColorRed = 0xCA3E3EFF; + mMenuColorGreen = 0x449944FF; + mMenuColorBlue = 0x4757ddff; + + mMenuColorSelector = 0x000000FF; + 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; + } } void ViewController::invalidSystemsFileDialog() diff --git a/es-core/src/Window.cpp b/es-core/src/Window.cpp index be4122515..ad0400a4e 100644 --- a/es-core/src/Window.cpp +++ b/es-core/src/Window.cpp @@ -579,10 +579,10 @@ void Window::render() // clang-format on // Also dim the background slightly. - if (Settings::getInstance()->getString("MenuColorScheme") == "dark") - backgroundParameters.dimming = 0.80f; - else + if (Settings::getInstance()->getString("MenuColorScheme") == "light") backgroundParameters.dimming = 0.60f; + else + backgroundParameters.dimming = 0.80f; mRenderer->shaderPostprocessing(Renderer::Shader::CORE | Renderer::Shader::BLUR_HORIZONTAL | diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 7905d4b85..c37fb1fb7 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -311,7 +311,7 @@ void ComponentList::render(const glm::mat4& parentTrans) trans = glm::translate(trans, glm::vec3 {0.0f, -mCameraOffset, 0.0f}); glm::mat4 loopTrans {trans}; - const bool darkColorScheme {Settings::getInstance()->getString("MenuColorScheme") == "dark"}; + const bool darkColorScheme {Settings::getInstance()->getString("MenuColorScheme") != "light"}; // Draw selector bar if we're using the dark color scheme. if (mFocused && mOpacity == 1.0f && darkColorScheme) {