Some more changes to make the dark menu color scheme the default choice

This commit is contained in:
Leon Styhre 2023-07-13 17:46:06 +02:00
parent 6ad9918feb
commit 954492b1f4
3 changed files with 42 additions and 42 deletions

View file

@ -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()

View file

@ -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 |

View file

@ -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) {