From 60e580fa3e42785a2bf2485cf85bd8ff8ba8c361 Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Sat, 16 Jan 2021 16:03:38 +1100 Subject: [PATCH] ShutdownDialog: refresh system theme on instantiation. Whilst SystemMenu maintains a constant WindowServer connection, there isn't always a Window active on that connection to listen for theme changes - this causes the current theme in this process to fall out of sync with the rest of the system. This fixes this problem by re-requesting an UpdateSystemTheme message when the dialog is instantiated. --- Userland/Services/SystemMenu/ShutdownDialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Services/SystemMenu/ShutdownDialog.cpp b/Userland/Services/SystemMenu/ShutdownDialog.cpp index 5f01b7308e..76799dd4e1 100644 --- a/Userland/Services/SystemMenu/ShutdownDialog.cpp +++ b/Userland/Services/SystemMenu/ShutdownDialog.cpp @@ -68,6 +68,9 @@ ShutdownDialog::ShutdownDialog() set_title("SerenityOS"); set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/power.png")); + // Request WindowServer to re-update us on the current theme as we might've not been alive for the last notification. + refresh_system_theme(); + auto& main = set_main_widget(); main.set_layout(); main.layout()->set_margins({ 8, 8, 8, 8 });