mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibGUI: TextEditor should paint text with disabled color when disabled
This commit is contained in:
parent
b29ff7b821
commit
3a34323a78
Notes:
sideshowbarker
2024-07-19 08:54:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3a34323a78a
1 changed files with 2 additions and 1 deletions
|
@ -416,7 +416,8 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
#endif
|
||||
if (!document().has_spans()) {
|
||||
// Fast-path for plain text
|
||||
painter.draw_text(visual_line_rect, visual_line_text, m_text_alignment, palette().color(foreground_role()));
|
||||
auto color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
||||
painter.draw_text(visual_line_rect, visual_line_text, m_text_alignment, color);
|
||||
} else {
|
||||
int advance = font().glyph_width(' ') + font().glyph_spacing();
|
||||
Gfx::Rect character_rect = { visual_line_rect.location(), { font().glyph_width(' '), line_height() } };
|
||||
|
|
Loading…
Add table
Reference in a new issue