diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2020-09-20 13:22:54 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-21 20:15:10 +0200 |
commit | 253ab7536ac1174075afc038b261cc6d41dddf3f (patch) | |
tree | d4cd0e0e7028921a300633fcb95c86824afe59b4 /Libraries | |
parent | 7907df76175717d5288457fc18c36b01f96815cc (diff) | |
download | serenity-253ab7536ac1174075afc038b261cc6d41dddf3f.zip |
Base: Add the PlaceholderText attribute to themes
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGUI/TextEditor.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGfx/SystemTheme.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp index d885b71183..1dc7efd554 100644 --- a/Libraries/LibGUI/TextEditor.cpp +++ b/Libraries/LibGUI/TextEditor.cpp @@ -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); diff --git a/Libraries/LibGfx/SystemTheme.h b/Libraries/LibGfx/SystemTheme.h index b14b6ed59f..5af10896a9 100644 --- a/Libraries/LibGfx/SystemTheme.h +++ b/Libraries/LibGfx/SystemTheme.h @@ -70,6 +70,7 @@ namespace Gfx { C(MovingWindowTitle) \ C(MovingWindowTitleShadow) \ C(MovingWindowTitleStripes) \ + C(PlaceholderText) \ C(RubberBandBorder) \ C(RubberBandFill) \ C(Ruler) \ |