mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +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:
parent
fcf50af53d
commit
60e580fa3e
1 changed files with 3 additions and 0 deletions
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue