diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-08-17 19:38:46 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-25 13:28:50 +0200 |
commit | f833473df0f73bbd29febee882b989102705e21d (patch) | |
tree | facf9fabb5cb46badd304a7a5553394bf93dba97 | |
parent | 46d6347035357fb6ec49e21326e358e2e54557c8 (diff) | |
download | serenity-f833473df0f73bbd29febee882b989102705e21d.zip |
Apps+Demos+Dialogs: Remove unnecessary minimum window sizes
The new layout system conveniently calculates these for us now.
In the case of Mandelbrot where it needs to be overriden, make
sure to disable obey min widget size first. In EmojiInputDialog's
case, the window needs to be resized instead to center correctly.
-rw-r--r-- | Userland/Applications/Calendar/main.cpp | 1 | ||||
-rw-r--r-- | Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp | 1 | ||||
-rw-r--r-- | Userland/Applications/Welcome/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Demos/Mandelbrot/Mandelbrot.cpp | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/EmojiInputDialog.cpp | 2 |
5 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp index 3a7ba07ddd..67a5d50935 100644 --- a/Userland/Applications/Calendar/main.cpp +++ b/Userland/Applications/Calendar/main.cpp @@ -35,7 +35,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto window = TRY(GUI::Window::try_create()); window->set_title("Calendar"); window->resize(600, 480); - window->set_minimum_size(171, 141); window->set_icon(app_icon.bitmap_for_size(16)); auto main_widget = TRY(window->try_set_main_widget<GUI::Widget>()); diff --git a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp index d7e1441129..b05d97119e 100644 --- a/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp +++ b/Userland/Applications/SoundPlayer/SoundPlayerWidgetAdvancedView.cpp @@ -29,7 +29,6 @@ SoundPlayerWidgetAdvancedView::SoundPlayerWidgetAdvancedView(GUI::Window& window , m_window(window) { window.resize(455, 350); - window.set_minimum_size(600, 130); window.set_resizable(true); set_fill_with_background_color(true); diff --git a/Userland/Applications/Welcome/main.cpp b/Userland/Applications/Welcome/main.cpp index 1f11ab127f..bea1583f51 100644 --- a/Userland/Applications/Welcome/main.cpp +++ b/Userland/Applications/Welcome/main.cpp @@ -30,9 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto window = TRY(GUI::Window::try_create()); window->resize(480, 250); window->center_on_screen(); - window->set_title("Welcome"); - window->set_minimum_size(480, 250); window->set_icon(app_icon.bitmap_for_size(16)); auto welcome_widget = TRY(window->try_set_main_widget<WelcomeWidget>()); diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp index 586cd5212d..53667bc76e 100644 --- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp +++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp @@ -409,6 +409,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto window = TRY(GUI::Window::try_create()); window->set_double_buffering_enabled(false); window->set_title("Mandelbrot"); + window->set_obey_widget_min_size(false); window->set_minimum_size(320, 240); window->resize(window->minimum_size() * 2); auto mandelbrot = TRY(window->try_set_main_widget<Mandelbrot>()); diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp index caa60b9b98..d586ddd93e 100644 --- a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp +++ b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp @@ -62,7 +62,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window) int dialog_width = button_size * columns + magic_offset; int dialog_height = button_size * rows; - set_minimum_size(dialog_width, dialog_height); + resize(dialog_width, dialog_height); set_frameless(true); for (size_t row = 0; row < rows && index < code_points.size(); ++row) { |