diff options
author | Jaime Valenzuela Durán <jaime@jpandoac.xyz> | 2022-03-05 01:28:03 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-05 10:25:14 +0100 |
commit | 7c324004312d98c355234b6201a6b9930dd98090 (patch) | |
tree | f511ff1360f3eef0b80c7e78a2e68913a3f2751f /Userland/Libraries/LibGfx | |
parent | 26d29e922096acc79729acd01ae2a3fdf153a50f (diff) | |
download | serenity-7c324004312d98c355234b6201a6b9930dd98090.zip |
Base+LibGUI+LibGfx: Improve disabled text readability
Currently, disabled text colors are hardcoded. They look good in Default
and light themes, but no so good in dark ones. This PR adds new
variables for all themes to correctly display disabled text.
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r-- | Userland/Libraries/LibGfx/Palette.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/SystemTheme.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/Palette.h b/Userland/Libraries/LibGfx/Palette.h index d6d5d9cef3..365e8cc2e0 100644 --- a/Userland/Libraries/LibGfx/Palette.h +++ b/Userland/Libraries/LibGfx/Palette.h @@ -99,6 +99,8 @@ public: Color menu_selection_text() const { return color(ColorRole::MenuSelectionText); } Color base() const { return color(ColorRole::Base); } Color base_text() const { return color(ColorRole::BaseText); } + Color disabled_text_front() const { return color(ColorRole::DisabledTextFront); } + Color disabled_text_back() const { return color(ColorRole::DisabledTextBack); } Color button() const { return color(ColorRole::Button); } Color button_text() const { return color(ColorRole::ButtonText); } Color threed_highlight() const { return color(ColorRole::ThreedHighlight); } diff --git a/Userland/Libraries/LibGfx/SystemTheme.h b/Userland/Libraries/LibGfx/SystemTheme.h index 30b15b4279..769760c6dd 100644 --- a/Userland/Libraries/LibGfx/SystemTheme.h +++ b/Userland/Libraries/LibGfx/SystemTheme.h @@ -30,6 +30,8 @@ namespace Gfx { C(BaseText) \ C(Button) \ C(ButtonText) \ + C(DisabledTextFront) \ + C(DisabledTextBack) \ C(DesktopBackground) \ C(FocusOutline) \ C(Gutter) \ |