mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
WindowServer: New title bar vars for themes
The theming system can now control title bar height, title button size, title stripe color and the title text shadow color. The implemented theme metrics system could be later extended to LibGUI to allow themes to change widget padding, border width, etc.
This commit is contained in:
parent
8e364b9780
commit
51b2b0d5e5
7 changed files with 142 additions and 10 deletions
|
@ -44,6 +44,7 @@ public:
|
|||
NonnullRefPtr<PaletteImpl> clone() const;
|
||||
|
||||
Color color(ColorRole) const;
|
||||
int metric(MetricRole) const;
|
||||
const SystemTheme& theme() const;
|
||||
|
||||
void replace_internal_buffer(Badge<GUI::Application>, SharedBuffer& buffer);
|
||||
|
@ -79,6 +80,8 @@ public:
|
|||
Color highlight_window_border1() const { return color(ColorRole::HighlightWindowBorder1); }
|
||||
Color highlight_window_border2() const { return color(ColorRole::HighlightWindowBorder2); }
|
||||
Color highlight_window_title() const { return color(ColorRole::HighlightWindowTitle); }
|
||||
Color window_title_stripes() const { return color(ColorRole::WindowTitleStripes); }
|
||||
Color window_title_shadow() const { return color(ColorRole::WindowTitleShadow); }
|
||||
Color menu_stripe() const { return color(ColorRole::MenuStripe); }
|
||||
Color menu_base() const { return color(ColorRole::MenuBase); }
|
||||
Color menu_base_text() const { return color(ColorRole::MenuBaseText); }
|
||||
|
@ -117,9 +120,15 @@ public:
|
|||
Color syntax_preprocessor_statement() const { return color(ColorRole::SyntaxPreprocessorStatement); }
|
||||
Color syntax_preprocessor_value() const { return color(ColorRole::SyntaxPreprocessorValue); }
|
||||
|
||||
int window_title_height() const { return metric(MetricRole::TitleHeight); }
|
||||
int window_title_button_width() const { return metric(MetricRole::TitleButtonWidth); }
|
||||
int window_title_button_height() const { return metric(MetricRole::TitleButtonHeight); }
|
||||
|
||||
Color color(ColorRole role) const { return m_impl->color(role); }
|
||||
int metric(MetricRole role) const { return m_impl->metric(role); }
|
||||
|
||||
void set_color(ColorRole, Color);
|
||||
void set_metric(MetricRole, int);
|
||||
|
||||
const SystemTheme& theme() const { return m_impl->theme(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue