mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
Base: Add the PlaceholderText attribute to themes
This commit is contained in:
committed by
Andreas Kling
parent
7907df7617
commit
253ab7536a
@@ -465,7 +465,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
||||
if (!placeholder().is_empty() && document().is_empty() && !is_focused() && line_index == 0) {
|
||||
auto line_rect = visual_line_rect;
|
||||
line_rect.set_width(font().width(placeholder()));
|
||||
painter.draw_text(line_rect, placeholder(), m_text_alignment, palette().color(Gfx::ColorRole::DisabledText));
|
||||
painter.draw_text(line_rect, placeholder(), m_text_alignment, palette().color(Gfx::ColorRole::PlaceholderText));
|
||||
} else if (!document().has_spans()) {
|
||||
// Fast-path for plain text
|
||||
auto color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
||||
|
||||
Reference in New Issue
Block a user