mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
LibGfx: Add more syntax-related ColorRoles
This commit is contained in:
parent
4646bf4b92
commit
22f835332a
3 changed files with 14 additions and 10 deletions
|
@ -27,10 +27,6 @@ Palette::Palette(const PaletteImpl& impl)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Palette::~Palette()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int PaletteImpl::metric(MetricRole role) const
|
int PaletteImpl::metric(MetricRole role) const
|
||||||
{
|
{
|
||||||
VERIFY((int)role < (int)MetricRole::__Count);
|
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';
|
theme.path[(int)role][sizeof(theme.path[(int)role]) - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
PaletteImpl::~PaletteImpl()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void PaletteImpl::replace_internal_buffer(Badge<GUI::Application>, Core::AnonymousBuffer buffer)
|
void PaletteImpl::replace_internal_buffer(Badge<GUI::Application>, Core::AnonymousBuffer buffer)
|
||||||
{
|
{
|
||||||
m_theme_buffer = move(buffer);
|
m_theme_buffer = move(buffer);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class PaletteImpl : public RefCounted<PaletteImpl> {
|
||||||
AK_MAKE_NONMOVABLE(PaletteImpl);
|
AK_MAKE_NONMOVABLE(PaletteImpl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~PaletteImpl();
|
~PaletteImpl() = default;
|
||||||
static NonnullRefPtr<PaletteImpl> create_with_anonymous_buffer(Core::AnonymousBuffer);
|
static NonnullRefPtr<PaletteImpl> create_with_anonymous_buffer(Core::AnonymousBuffer);
|
||||||
NonnullRefPtr<PaletteImpl> clone() const;
|
NonnullRefPtr<PaletteImpl> clone() const;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class Palette {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Palette(const PaletteImpl&);
|
explicit Palette(const PaletteImpl&);
|
||||||
~Palette();
|
~Palette() = default;
|
||||||
|
|
||||||
Color accent() const { return color(ColorRole::Accent); }
|
Color accent() const { return color(ColorRole::Accent); }
|
||||||
Color window() const { return color(ColorRole::Window); }
|
Color window() const { return color(ColorRole::Window); }
|
||||||
|
@ -131,6 +131,12 @@ public:
|
||||||
Color syntax_control_keyword() const { return color(ColorRole::SyntaxControlKeyword); }
|
Color syntax_control_keyword() const { return color(ColorRole::SyntaxControlKeyword); }
|
||||||
Color syntax_preprocessor_statement() const { return color(ColorRole::SyntaxPreprocessorStatement); }
|
Color syntax_preprocessor_statement() const { return color(ColorRole::SyntaxPreprocessorStatement); }
|
||||||
Color syntax_preprocessor_value() const { return color(ColorRole::SyntaxPreprocessorValue); }
|
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); }
|
Gfx::TextAlignment title_alignment() const { return alignment(AlignmentRole::TitleAlignment); }
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,12 @@ namespace Gfx {
|
||||||
C(SyntaxPunctuation) \
|
C(SyntaxPunctuation) \
|
||||||
C(SyntaxString) \
|
C(SyntaxString) \
|
||||||
C(SyntaxType) \
|
C(SyntaxType) \
|
||||||
|
C(SyntaxFunction) \
|
||||||
|
C(SyntaxVariable) \
|
||||||
|
C(SyntaxCustomType) \
|
||||||
|
C(SyntaxNamespace) \
|
||||||
|
C(SyntaxMember) \
|
||||||
|
C(SyntaxParameter) \
|
||||||
C(TextCursor) \
|
C(TextCursor) \
|
||||||
C(ThreedHighlight) \
|
C(ThreedHighlight) \
|
||||||
C(ThreedShadow1) \
|
C(ThreedShadow1) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue