|
@@ -1,5 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
+ * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
|
|
*
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
*/
|
|
@@ -30,6 +31,12 @@ public:
|
|
|
return Color::from_rgba(theme().color[(int)role]);
|
|
|
}
|
|
|
|
|
|
+ bool flag(FlagRole role) const
|
|
|
+ {
|
|
|
+ VERIFY((int)role < (int)FlagRole::__Count);
|
|
|
+ return theme().flag[(int)role];
|
|
|
+ }
|
|
|
+
|
|
|
int metric(MetricRole) const;
|
|
|
String path(PathRole) const;
|
|
|
const SystemTheme& theme() const { return *m_theme_buffer.data<SystemTheme>(); }
|
|
@@ -118,6 +125,8 @@ public:
|
|
|
Color syntax_preprocessor_statement() const { return color(ColorRole::SyntaxPreprocessorStatement); }
|
|
|
Color syntax_preprocessor_value() const { return color(ColorRole::SyntaxPreprocessorValue); }
|
|
|
|
|
|
+ bool is_dark() const { return flag(FlagRole::IsDark); }
|
|
|
+
|
|
|
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); }
|
|
@@ -130,10 +139,12 @@ public:
|
|
|
String tooltip_shadow_path() const { return path(PathRole::TooltipShadow); }
|
|
|
|
|
|
Color color(ColorRole role) const { return m_impl->color(role); }
|
|
|
+ bool flag(FlagRole role) const { return m_impl->flag(role); }
|
|
|
int metric(MetricRole role) const { return m_impl->metric(role); }
|
|
|
String path(PathRole role) const { return m_impl->path(role); }
|
|
|
|
|
|
void set_color(ColorRole, Color);
|
|
|
+ void set_flag(FlagRole, bool);
|
|
|
void set_metric(MetricRole, int);
|
|
|
void set_path(PathRole, String);
|
|
|
|