mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Magnifier: Make window resizable
Instead of having the window non-resizable, it now defaults to a frame size of 200 x 200 pixels but is user-resizable. The shown screenshot updates its size accordingly. :^) Sometimes we might need a larger view, or a non-square shape.
This commit is contained in:
parent
1c1b106f6c
commit
8afcd22900
2 changed files with 7 additions and 10 deletions
|
@ -46,7 +46,6 @@ int main(int argc, char** argv)
|
|||
auto window = GUI::Window::construct();
|
||||
window->set_title("Magnifier");
|
||||
window->resize(window_dimensions, window_dimensions);
|
||||
window->set_resizable(false);
|
||||
window->set_minimizable(false);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
auto& magnifier = window->set_main_widget<MagnifierWidget>();
|
||||
|
@ -80,10 +79,12 @@ int main(int argc, char** argv)
|
|||
|
||||
auto& help_menu = menubar->add_menu("&Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Magnifier", app_icon, window));
|
||||
window->set_menubar(move(menubar));
|
||||
|
||||
window->set_menubar(move(menubar));
|
||||
window->show();
|
||||
|
||||
magnifier.track_cursor_globally();
|
||||
magnifier.start_timer(16);
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue