diff options
author | Tom <tomut@yahoo.com> | 2021-02-11 15:12:19 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-11 23:36:11 +0100 |
commit | cf1c159ed541222aeeb03d249f1e64ef0650b2df (patch) | |
tree | 816393140c8a3c01fb046c9a7cef73de289d67b2 /Userland/Libraries | |
parent | 8c694ed6ebd8ea7f036dcaa6306cf49225c377e8 (diff) | |
download | serenity-cf1c159ed541222aeeb03d249f1e64ef0650b2df.zip |
WindowServer: Allow different shadows for active/inactive windows
Also allow specifying different shadows for the task and menu bar.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibGfx/Palette.h | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/SystemTheme.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/SystemTheme.h | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGfx/Palette.h b/Userland/Libraries/LibGfx/Palette.h index b775be85cf..34ce928ba8 100644 --- a/Userland/Libraries/LibGfx/Palette.h +++ b/Userland/Libraries/LibGfx/Palette.h @@ -140,8 +140,11 @@ public: int window_title_button_height() const { return metric(MetricRole::TitleButtonHeight); } String title_button_icons_path() const { return path(PathRole::TitleButtonIcons); } - String window_shadow_path() const { return path(PathRole::WindowShadow); } + String active_window_shadow_path() const { return path(PathRole::ActiveWindowShadow); } + String inactive_window_shadow_path() const { return path(PathRole::InactiveWindowShadow); } + String menu_bar_shadow_path() const { return path(PathRole::MenuBarShadow); } String menu_shadow_path() const { return path(PathRole::MenuShadow); } + String task_bar_shadow_path() const { return path(PathRole::TaskBarShadow); } String tooltip_shadow_path() const { return path(PathRole::TooltipShadow); } Color color(ColorRole role) const { return m_impl->color(role); } diff --git a/Userland/Libraries/LibGfx/SystemTheme.cpp b/Userland/Libraries/LibGfx/SystemTheme.cpp index 51c31da807..6e2961a3f7 100644 --- a/Userland/Libraries/LibGfx/SystemTheme.cpp +++ b/Userland/Libraries/LibGfx/SystemTheme.cpp @@ -119,9 +119,12 @@ Core::AnonymousBuffer load_system_theme(const String& path) } while (0) DO_PATH(TitleButtonIcons, false); + DO_PATH(ActiveWindowShadow, true); + DO_PATH(InactiveWindowShadow, true); + DO_PATH(TaskBarShadow, true); + DO_PATH(MenuBarShadow, true); DO_PATH(MenuShadow, true); DO_PATH(TooltipShadow, true); - DO_PATH(WindowShadow, true); return buffer; } diff --git a/Userland/Libraries/LibGfx/SystemTheme.h b/Userland/Libraries/LibGfx/SystemTheme.h index a34872c7a6..ad7c423b92 100644 --- a/Userland/Libraries/LibGfx/SystemTheme.h +++ b/Userland/Libraries/LibGfx/SystemTheme.h @@ -144,7 +144,10 @@ enum class MetricRole { enum class PathRole { NoRole, TitleButtonIcons, - WindowShadow, + InactiveWindowShadow, + ActiveWindowShadow, + TaskBarShadow, + MenuBarShadow, MenuShadow, TooltipShadow, __Count, |