From ac78f1e8122c2619028baf1ea144cbc111037615 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Mon, 12 Jul 2021 10:05:31 +0200 Subject: [PATCH] TaskbarWindow: Redraw start button when default font changes --- Userland/Services/Taskbar/TaskbarWindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Userland/Services/Taskbar/TaskbarWindow.cpp b/Userland/Services/Taskbar/TaskbarWindow.cpp index def76601bd..6e52c97af8 100644 --- a/Userland/Services/Taskbar/TaskbarWindow.cpp +++ b/Userland/Services/Taskbar/TaskbarWindow.cpp @@ -246,7 +246,8 @@ void TaskbarWindow::update_window_button(::Window& window, bool show_as_active) void TaskbarWindow::event(Core::Event& event) { - if (event.type() == GUI::Event::MouseDown) { + switch (event.type()) { + case GUI::Event::MouseDown: { // If the cursor is at the edge/corner of the screen but technically not within the start button (or other taskbar buttons), // we adjust it so that the nearest button ends up being clicked anyways. @@ -262,6 +263,11 @@ void TaskbarWindow::event(Core::Event& event) Window::event(adjusted_event); return; } + break; + } + case GUI::Event::FontsChange: + m_start_button->set_font(Gfx::FontDatabase::default_font().bold_variant()); + break; } Window::event(event); }