mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
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.
This commit is contained in:
parent
26d29e9220
commit
7c32400431
Notes:
sideshowbarker
2024-07-19 17:07:46 +09:00
Author: https://github.com/Detoxify92
Commit: 7c32400431
Pull-request: https://github.com/SerenityOS/serenity/pull/12880
22 changed files with 44 additions and 4 deletions
|
@ -226,8 +226,8 @@ void AbstractButton::paint_text(Painter& painter, const Gfx::IntRect& rect, cons
|
|||
auto clipped_rect = rect.intersected(this->rect());
|
||||
|
||||
if (!is_enabled()) {
|
||||
painter.draw_text(clipped_rect.translated(1, 1), text(), font, text_alignment, Color::White, Gfx::TextElision::Right, text_wrapping);
|
||||
painter.draw_text(clipped_rect, text(), font, text_alignment, Color::from_rgb(0x808080), Gfx::TextElision::Right, text_wrapping);
|
||||
painter.draw_text(clipped_rect.translated(1, 1), text(), font, text_alignment, palette().disabled_text_back(), Gfx::TextElision::Right, text_wrapping);
|
||||
painter.draw_text(clipped_rect, text(), font, text_alignment, palette().disabled_text_front(), Gfx::TextElision::Right, text_wrapping);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue