mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
Magnifier: Remove always_on_top_action
This action was originally added so that Magnifier's window would always be on top by default, but it's a redundant menu item and wasn't actually setting itself at start-up. Instead, rely on the same menu item provided to all Modeless windows by default for a more consistent UX, and set the option after show() so it takes effect.
This commit is contained in:
parent
18af8be0e6
commit
f8e0bcbedf
1 changed files with 1 additions and 7 deletions
|
@ -107,11 +107,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
magnifier->pause_capture(action.is_checked());
|
magnifier->pause_capture(action.is_checked());
|
||||||
});
|
});
|
||||||
|
|
||||||
auto always_on_top_action = GUI::Action::create_checkable(
|
|
||||||
"&Always on Top", [&](auto& action) {
|
|
||||||
window->set_always_on_top(action.is_checked());
|
|
||||||
});
|
|
||||||
|
|
||||||
size_action_group->add_action(two_x_action);
|
size_action_group->add_action(two_x_action);
|
||||||
size_action_group->add_action(four_x_action);
|
size_action_group->add_action(four_x_action);
|
||||||
size_action_group->add_action(eight_x_action);
|
size_action_group->add_action(eight_x_action);
|
||||||
|
@ -124,9 +119,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
two_x_action->set_checked(true);
|
two_x_action->set_checked(true);
|
||||||
|
|
||||||
TRY(view_menu->try_add_separator());
|
TRY(view_menu->try_add_separator());
|
||||||
TRY(view_menu->try_add_action(always_on_top_action));
|
|
||||||
TRY(view_menu->try_add_action(pause_action));
|
TRY(view_menu->try_add_action(pause_action));
|
||||||
always_on_top_action->set_checked(true);
|
|
||||||
|
|
||||||
auto timeline_menu = TRY(window->try_add_menu("&Timeline"));
|
auto timeline_menu = TRY(window->try_add_menu("&Timeline"));
|
||||||
auto previous_frame_action = GUI::Action::create(
|
auto previous_frame_action = GUI::Action::create(
|
||||||
|
@ -151,6 +144,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier", app_icon, window));
|
help_menu->add_action(GUI::CommonActions::make_about_action("Magnifier", app_icon, window));
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
|
window->set_always_on_top(true);
|
||||||
|
|
||||||
return app->exec();
|
return app->exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue