mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
Base: Add the PlaceholderText attribute to themes
This commit is contained in:
parent
7907df7617
commit
253ab7536a
Notes:
sideshowbarker
2024-07-19 02:17:54 +09:00
Author: https://github.com/petelliott
Commit: 253ab7536a
Pull-request: https://github.com/SerenityOS/serenity/pull/3569
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