LibGfx: Add more syntax-related ColorRoles

This commit is contained in:
Itamar 2022-02-06 23:10:42 +02:00 committed by Andreas Kling
parent 4646bf4b92
commit 22f835332a
Notes: sideshowbarker 2024-07-17 19:07:29 +09:00
3 changed files with 14 additions and 10 deletions

View file

@ -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);

View file

@ -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); }

View file

@ -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) \