mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGfx: Add more syntax-related ColorRoles
This commit is contained in:
parent
4646bf4b92
commit
22f835332a
Notes:
sideshowbarker
2024-07-17 19:07:29 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/22f835332a Pull-request: https://github.com/SerenityOS/serenity/pull/12335 Reviewed-by: https://github.com/guerinoni
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
|
||||
{
|
||||
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);
|
||||
|
|
|
@ -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); }
|
||||
|
||||
|
|
|
@ -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) \
|
||||
|
|
Loading…
Reference in a new issue