diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-28 20:20:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-28 20:21:52 +0200 |
commit | e378587c8237074d964f6b5c113af078a68da271 (patch) | |
tree | f25b5c6e8cc767da9ff002720eb4aa3ff724b327 /Userland/Libraries/LibGfx | |
parent | 03cca2069974176ff454746154ed34fbcc760eb4 (diff) | |
download | serenity-e378587c8237074d964f6b5c113af078a68da271.zip |
LibGfx+Base: Add a themable "Accent" color role
This can be used by GUI widgets to draw attention to a specific part of
the widget, for example the currently active sub-widget component.
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r-- | Userland/Libraries/LibGfx/Palette.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/SystemTheme.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/Palette.h b/Userland/Libraries/LibGfx/Palette.h index f60b698c76..929503de14 100644 --- a/Userland/Libraries/LibGfx/Palette.h +++ b/Userland/Libraries/LibGfx/Palette.h @@ -48,6 +48,7 @@ public: explicit Palette(const PaletteImpl&); ~Palette(); + Color accent() const { return color(ColorRole::Accent); } Color window() const { return color(ColorRole::Window); } Color window_text() const { return color(ColorRole::WindowText); } Color selection() const { return color(ColorRole::Selection); } diff --git a/Userland/Libraries/LibGfx/SystemTheme.h b/Userland/Libraries/LibGfx/SystemTheme.h index f155bd9a1b..062722e90a 100644 --- a/Userland/Libraries/LibGfx/SystemTheme.h +++ b/Userland/Libraries/LibGfx/SystemTheme.h @@ -15,6 +15,7 @@ namespace Gfx { #define ENUMERATE_COLOR_ROLES(C) \ + C(Accent) \ C(ActiveLink) \ C(ActiveWindowBorder1) \ C(ActiveWindowBorder2) \ |