Deskbar: Improved UX in the shutdown submenu
* Moved 'Power Off' on top of 'Restart system'. * Made a few visual changes to the code that adhere better to the Haiku coding style. * 'Suspend' is now at the bottom of the shutdown submenu. Change-Id: I0d41e3e5656d5d9ea02e3cb072b6a6092c70c640 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2701 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
e54b2d7cf2
commit
79ca65ac9d
@ -294,6 +294,11 @@ B_TRANSLATE_MARK_VOID("About this system")
|
||||
|
||||
BMenu* shutdownMenu = new BMenu(B_TRANSLATE("Shutdown" B_UTF8_ELLIPSIS));
|
||||
|
||||
item = new BMenuItem(B_TRANSLATE("Power off"),
|
||||
new BMessage(kShutdownSystem));
|
||||
item->SetEnabled(!dragging);
|
||||
shutdownMenu->AddItem(item);
|
||||
|
||||
item = new BMenuItem(B_TRANSLATE("Restart system"),
|
||||
new BMessage(kRebootSystem));
|
||||
item->SetEnabled(!dragging);
|
||||
@ -310,13 +315,9 @@ B_TRANSLATE_MARK_VOID("About this system")
|
||||
}
|
||||
#endif
|
||||
|
||||
item = new BMenuItem(B_TRANSLATE("Power off"),
|
||||
new BMessage(kShutdownSystem));
|
||||
item->SetEnabled(!dragging);
|
||||
shutdownMenu->AddItem(item);
|
||||
shutdownMenu->SetFont(be_plain_font);
|
||||
|
||||
shutdownMenu->SetTargetForItems(be_app);
|
||||
|
||||
BMessage* message = new BMessage(kShutdownSystem);
|
||||
message->AddBool("confirm", true);
|
||||
AddItem(new BMenuItem(shutdownMenu, message));
|
||||
|
Loading…
Reference in New Issue
Block a user