From 08456be9dc970a2beb4761c4d2bfc687c93d6bb6 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Sun, 29 Jan 2023 09:05:27 -0500 Subject: [PATCH] LibGUI+LibGfx: Add Tray ColorRole helpers to Palette --- Userland/Libraries/LibGUI/Tray.cpp | 2 +- Userland/Libraries/LibGfx/Palette.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGUI/Tray.cpp b/Userland/Libraries/LibGUI/Tray.cpp index 9b9ab1d8b1..6ea44cf2cd 100644 --- a/Userland/Libraries/LibGUI/Tray.cpp +++ b/Userland/Libraries/LibGUI/Tray.cpp @@ -102,7 +102,7 @@ void Tray::paint_event(GUI::PaintEvent& event) } auto const& font = is_checked ? this->font().bold_variant() : this->font(); - painter.draw_text(text_rect, item.text, font, Gfx::TextAlignment::CenterLeft, palette().color(Gfx::ColorRole::TrayText)); + painter.draw_text(text_rect, item.text, font, Gfx::TextAlignment::CenterLeft, palette().tray_text()); } } diff --git a/Userland/Libraries/LibGfx/Palette.h b/Userland/Libraries/LibGfx/Palette.h index 6205e16af6..1b99332e6b 100644 --- a/Userland/Libraries/LibGfx/Palette.h +++ b/Userland/Libraries/LibGfx/Palette.h @@ -117,6 +117,8 @@ public: Color ruler_inactive_text() const { return color(ColorRole::RulerInactiveText); } Color text_cursor() const { return color(ColorRole::TextCursor); } Color focus_outline() const { return color(ColorRole::FocusOutline); } + Color tray() const { return color(ColorRole::Tray); } + Color tray_text() const { return color(ColorRole::TrayText); } Color link() const { return color(ColorRole::Link); } Color active_link() const { return color(ColorRole::ActiveLink); }