diff options
author | Anders Fimreite <anders.fimreite@gmail.com> | 2021-09-01 15:13:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 17:38:59 +0200 |
commit | 2ecbe5dd7154f791b0d00748756eb72c65967534 (patch) | |
tree | 50ede306c61b84405173135a404d8107902062c3 /Userland/Applications/KeyboardMapper | |
parent | 0583f75926b0842f582efdcc4870116bc3c79382 (diff) | |
download | serenity-2ecbe5dd7154f791b0d00748756eb72c65967534.zip |
Keyboard Mapper: Better text color for buttons in dark theme
When using a dark theme the name of the key does not show up well at
all. This is due to it being set with pallete().button_text(), which for
dark themes is a light color. As Keyboard Mapper does not follow the
system color theme, the text on the keys should not either.
Diffstat (limited to 'Userland/Applications/KeyboardMapper')
-rw-r--r-- | Userland/Applications/KeyboardMapper/KeyButton.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/KeyboardMapper/KeyButton.cpp b/Userland/Applications/KeyboardMapper/KeyButton.cpp index d353fa9050..d96292ed2e 100644 --- a/Userland/Applications/KeyboardMapper/KeyButton.cpp +++ b/Userland/Applications/KeyboardMapper/KeyButton.cpp @@ -40,7 +40,7 @@ void KeyButton::paint_event(GUI::PaintEvent& event) Gfx::IntRect text_rect { 0, 0, font.width(text()), font.glyph_height() }; text_rect.align_within({ cont_rect.x() + 7, cont_rect.y() + 4, cont_rect.width() - 14, cont_rect.height() - 14 }, Gfx::TextAlignment::Center); - painter.draw_text(text_rect, text(), font, Gfx::TextAlignment::Center, palette().button_text(), Gfx::TextElision::Right); + painter.draw_text(text_rect, text(), font, Gfx::TextAlignment::Center, Color::Black, Gfx::TextElision::Right); if (is_focused()) painter.draw_rect(text_rect.inflated(6, 4), palette().focus_outline()); } |