From 22f835332a7a72bbe143e857b721659552452b73 Mon Sep 17 00:00:00 2001 From: Itamar Date: Sun, 6 Feb 2022 23:10:42 +0200 Subject: [PATCH] LibGfx: Add more syntax-related ColorRoles --- Userland/Libraries/LibGfx/Palette.cpp | 8 -------- Userland/Libraries/LibGfx/Palette.h | 10 ++++++++-- Userland/Libraries/LibGfx/SystemTheme.h | 6 ++++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Userland/Libraries/LibGfx/Palette.cpp b/Userland/Libraries/LibGfx/Palette.cpp index e0c1984b6c9..b6d6711a477 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, Core::AnonymousBuffer buffer) { m_theme_buffer = move(buffer); diff --git a/Userland/Libraries/LibGfx/Palette.h b/Userland/Libraries/LibGfx/Palette.h index f034a1b990d..4d0e9096ecd 100644 --- a/Userland/Libraries/LibGfx/Palette.h +++ b/Userland/Libraries/LibGfx/Palette.h @@ -22,7 +22,7 @@ class PaletteImpl : public RefCounted { AK_MAKE_NONMOVABLE(PaletteImpl); public: - ~PaletteImpl(); + ~PaletteImpl() = default; static NonnullRefPtr create_with_anonymous_buffer(Core::AnonymousBuffer); NonnullRefPtr 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 ec1c00f6a40..c2a90a8fe30 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) \