summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2022-02-06 23:10:42 +0200
committerAndreas Kling <kling@serenityos.org>2022-02-09 00:51:31 +0100
commit22f835332a7a72bbe143e857b721659552452b73 (patch)
treea3fcd0cc824b757a975d20f760a4adefcdbc3eb2 /Userland/Libraries/LibGfx
parent4646bf4b9221490f1eca39f894d84a34646f5421 (diff)
downloadserenity-22f835332a7a72bbe143e857b721659552452b73.zip
LibGfx: Add more syntax-related ColorRoles
Diffstat (limited to 'Userland/Libraries/LibGfx')
-rw-r--r--Userland/Libraries/LibGfx/Palette.cpp8
-rw-r--r--Userland/Libraries/LibGfx/Palette.h10
-rw-r--r--Userland/Libraries/LibGfx/SystemTheme.h6
3 files changed, 14 insertions, 10 deletions
diff --git a/Userland/Libraries/LibGfx/Palette.cpp b/Userland/Libraries/LibGfx/Palette.cpp
index e0c1984b6c..b6d6711a47 100644
--- a/Userland/Libraries/LibGfx/Palette.cpp
+++ b/Userland/Libraries/LibGfx/Palette.cpp
@@ -27,10 +27,6 @@ Palette::Palette(const PaletteImpl& impl)
{
}
-Palette::~Palette()
-{
-}
-
int PaletteImpl::metric(MetricRole role) const
{
VERIFY((int)role < (int)MetricRole::__Count);
@@ -91,10 +87,6 @@ void Palette::set_path(PathRole role, String path)
theme.path[(int)role][sizeof(theme.path[(int)role]) - 1] = '\0';
}
-PaletteImpl::~PaletteImpl()
-{
-}
-
void PaletteImpl::replace_internal_buffer(Badge<GUI::Application>, Core::AnonymousBuffer buffer)
{
m_theme_buffer = move(buffer);
diff --git a/Userland/Libraries/LibGfx/Palette.h b/Userland/Libraries/LibGfx/Palette.h
index f034a1b990..4d0e9096ec 100644
--- a/Userland/Libraries/LibGfx/Palette.h
+++ b/Userland/Libraries/LibGfx/Palette.h
@@ -22,7 +22,7 @@ class PaletteImpl : public RefCounted<PaletteImpl> {
AK_MAKE_NONMOVABLE(PaletteImpl);
public:
- ~PaletteImpl();
+ ~PaletteImpl() = default;
static NonnullRefPtr<PaletteImpl> create_with_anonymous_buffer(Core::AnonymousBuffer);
NonnullRefPtr<PaletteImpl> clone() const;
@@ -60,7 +60,7 @@ class Palette {
public:
explicit Palette(const PaletteImpl&);
- ~Palette();
+ ~Palette() = default;
Color accent() const { return color(ColorRole::Accent); }
Color window() const { return color(ColorRole::Window); }
@@ -131,6 +131,12 @@ public:
Color syntax_control_keyword() const { return color(ColorRole::SyntaxControlKeyword); }
Color syntax_preprocessor_statement() const { return color(ColorRole::SyntaxPreprocessorStatement); }
Color syntax_preprocessor_value() const { return color(ColorRole::SyntaxPreprocessorValue); }
+ Color syntax_function() const { return color(ColorRole::SyntaxFunction); }
+ Color syntax_variable() const { return color(ColorRole::SyntaxVariable); }
+ Color syntax_custom_type() const { return color(ColorRole::SyntaxCustomType); }
+ Color syntax_namespace() const { return color(ColorRole::SyntaxNamespace); }
+ Color syntax_member() const { return color(ColorRole::SyntaxMember); }
+ Color syntax_parameter() const { return color(ColorRole::SyntaxParameter); }
Gfx::TextAlignment title_alignment() const { return alignment(AlignmentRole::TitleAlignment); }
diff --git a/Userland/Libraries/LibGfx/SystemTheme.h b/Userland/Libraries/LibGfx/SystemTheme.h
index ec1c00f6a4..c2a90a8fe3 100644
--- a/Userland/Libraries/LibGfx/SystemTheme.h
+++ b/Userland/Libraries/LibGfx/SystemTheme.h
@@ -80,6 +80,12 @@ namespace Gfx {
C(SyntaxPunctuation) \
C(SyntaxString) \
C(SyntaxType) \
+ C(SyntaxFunction) \
+ C(SyntaxVariable) \
+ C(SyntaxCustomType) \
+ C(SyntaxNamespace) \
+ C(SyntaxMember) \
+ C(SyntaxParameter) \
C(TextCursor) \
C(ThreedHighlight) \
C(ThreedShadow1) \