mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-03 20:15:53 +00:00
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.
This commit is contained in:
committed by
Andreas Kling
parent
fcf50af53d
commit
60e580fa3e
@@ -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<GUI::Widget>();
|
||||
main.set_layout<GUI::VerticalBoxLayout>();
|
||||
main.layout()->set_margins({ 8, 8, 8, 8 });
|
||||
|
||||
Reference in New Issue
Block a user