mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +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
|
@ -44,6 +44,7 @@ RubberBandBorder=#ff7f00
|
||||||
Link=#88c
|
Link=#88c
|
||||||
ActiveLink=#c88
|
ActiveLink=#c88
|
||||||
VisitedLink=#c8c
|
VisitedLink=#c8c
|
||||||
|
PlaceholderText=#171717
|
||||||
Ruler=#0f0f0f
|
Ruler=#0f0f0f
|
||||||
RulerBorder=#2f2f2f
|
RulerBorder=#2f2f2f
|
||||||
RulerActiveText=white
|
RulerActiveText=white
|
||||||
|
|
|
@ -36,6 +36,7 @@ RubberBandBorder=black
|
||||||
Link=#88c
|
Link=#88c
|
||||||
ActiveLink=#c88
|
ActiveLink=#c88
|
||||||
VisitedLink=#c8c
|
VisitedLink=#c8c
|
||||||
|
PlaceholderText=#2e2f30
|
||||||
Ruler=#505050
|
Ruler=#505050
|
||||||
RulerBorder=#666666
|
RulerBorder=#666666
|
||||||
RulerActiveText=white
|
RulerActiveText=white
|
||||||
|
|
|
@ -39,6 +39,7 @@ Selection=#84351a
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#808080
|
||||||
RubberBandFill=#f4ca9e3c
|
RubberBandFill=#f4ca9e3c
|
||||||
RubberBandBorder=#6e2209
|
RubberBandBorder=#6e2209
|
||||||
Link=blue
|
Link=blue
|
||||||
|
|
|
@ -31,11 +31,13 @@ Selection=#2642a6
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#3d3e40
|
||||||
RubberBandFill=#8080803c
|
RubberBandFill=#8080803c
|
||||||
RubberBandBorder=black
|
RubberBandBorder=black
|
||||||
Link=#88c
|
Link=#88c
|
||||||
ActiveLink=#c88
|
ActiveLink=#c88
|
||||||
VisitedLink=#c8c
|
VisitedLink=#c8c
|
||||||
|
PlaceholderText=#3d3e40
|
||||||
Ruler=#505050
|
Ruler=#505050
|
||||||
RulerBorder=#666666
|
RulerBorder=#666666
|
||||||
RulerActiveText=white
|
RulerActiveText=white
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=white
|
||||||
SelectionText=black
|
SelectionText=black
|
||||||
InactiveSelection=white
|
InactiveSelection=white
|
||||||
InactiveSelectionText=black
|
InactiveSelectionText=black
|
||||||
|
PlaceholderText=#282828
|
||||||
RubberBandFill=#9f9f9f
|
RubberBandFill=#9f9f9f
|
||||||
RubberBandBorder=black
|
RubberBandBorder=black
|
||||||
Link=#0000b0
|
Link=#0000b0
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=black
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=black
|
InactiveSelection=black
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#b0b0b0
|
||||||
RubberBandFill=#fad7653c
|
RubberBandFill=#fad7653c
|
||||||
RubberBandBorder=#f4ca9e
|
RubberBandBorder=#f4ca9e
|
||||||
Link=blue
|
Link=blue
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=#80004B
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#251AAB
|
InactiveSelection=#251AAB
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#800D51
|
||||||
RubberBandFill=#3127AB3c
|
RubberBandFill=#3127AB3c
|
||||||
RubberBandBorder=#251AAB
|
RubberBandBorder=#251AAB
|
||||||
Link=#88C
|
Link=#88C
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=#7e9dbc
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#3b4252
|
InactiveSelection=#3b4252
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#3b4252
|
||||||
RubberBandFill=#04434c5e
|
RubberBandFill=#04434c5e
|
||||||
RubberBandBorder=#4c566a
|
RubberBandBorder=#4c566a
|
||||||
Link=#7e9dbc
|
Link=#7e9dbc
|
||||||
|
|
|
@ -35,6 +35,7 @@ Selection=#1a3584
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#808080
|
||||||
RubberBandFill=#9ecaf43c
|
RubberBandFill=#9ecaf43c
|
||||||
RubberBandBorder=#09226e
|
RubberBandBorder=#09226e
|
||||||
Link=blue
|
Link=blue
|
||||||
|
|
|
@ -35,6 +35,7 @@ Selection=#0000aa
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#7f787f
|
||||||
RubberBandFill=#8080803c
|
RubberBandFill=#8080803c
|
||||||
RubberBandBorder=black
|
RubberBandBorder=black
|
||||||
Link=#88c
|
Link=#88c
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=#9c9cff
|
||||||
SelectionText=black
|
SelectionText=black
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#3b3b3b
|
||||||
RubberBandFill=#f4ca9e3c
|
RubberBandFill=#f4ca9e3c
|
||||||
RubberBandBorder=#6e2209
|
RubberBandBorder=#6e2209
|
||||||
Link=blue
|
Link=blue
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=black
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#9397a5
|
||||||
RubberBandFill=#0000003c
|
RubberBandFill=#0000003c
|
||||||
RubberBandBorder=#007f7f
|
RubberBandBorder=#007f7f
|
||||||
Link=#88c
|
Link=#88c
|
||||||
|
|
|
@ -31,6 +31,7 @@ Selection=#84351a
|
||||||
SelectionText=white
|
SelectionText=white
|
||||||
InactiveSelection=#606060
|
InactiveSelection=#606060
|
||||||
InactiveSelectionText=white
|
InactiveSelectionText=white
|
||||||
|
PlaceholderText=#a24841
|
||||||
RubberBandFill=#0466033c
|
RubberBandFill=#0466033c
|
||||||
RubberBandBorder=#76943c
|
RubberBandBorder=#76943c
|
||||||
Link=blue
|
Link=blue
|
||||||
|
|
|
@ -465,7 +465,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
||||||
if (!placeholder().is_empty() && document().is_empty() && !is_focused() && line_index == 0) {
|
if (!placeholder().is_empty() && document().is_empty() && !is_focused() && line_index == 0) {
|
||||||
auto line_rect = visual_line_rect;
|
auto line_rect = visual_line_rect;
|
||||||
line_rect.set_width(font().width(placeholder()));
|
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()) {
|
} else if (!document().has_spans()) {
|
||||||
// Fast-path for plain text
|
// Fast-path for plain text
|
||||||
auto color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
auto color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
||||||
|
|
|
@ -70,6 +70,7 @@ namespace Gfx {
|
||||||
C(MovingWindowTitle) \
|
C(MovingWindowTitle) \
|
||||||
C(MovingWindowTitleShadow) \
|
C(MovingWindowTitleShadow) \
|
||||||
C(MovingWindowTitleStripes) \
|
C(MovingWindowTitleStripes) \
|
||||||
|
C(PlaceholderText) \
|
||||||
C(RubberBandBorder) \
|
C(RubberBandBorder) \
|
||||||
C(RubberBandFill) \
|
C(RubberBandFill) \
|
||||||
C(Ruler) \
|
C(Ruler) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue