mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:55:08 +00:00
Base: Add the PlaceholderText attribute to themes
This commit is contained in:
parent
7907df7617
commit
253ab7536a
15 changed files with 16 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue