From 7b41a09540b5e8b6f29730c0819ca56a93eabb31 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 1 Feb 2022 14:50:30 -0500 Subject: [PATCH] LibGUI: Set a fixed width for the SettingsWindow reset-to-default button Otherwise, any subclass which increased the size of the window would see a very large reset button. The width chosen here is the same width as the other buttons in this window. --- Userland/Libraries/LibGUI/SettingsWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibGUI/SettingsWindow.cpp b/Userland/Libraries/LibGUI/SettingsWindow.cpp index 1a74d2c00d..d4c5d40a6a 100644 --- a/Userland/Libraries/LibGUI/SettingsWindow.cpp +++ b/Userland/Libraries/LibGUI/SettingsWindow.cpp @@ -39,6 +39,7 @@ ErrorOr> SettingsWindow::create(String title, Show if (show_defaults_button == ShowDefaultsButton::Yes) { window->m_reset_button = TRY(button_container->try_add("Defaults")); + window->m_reset_button->set_fixed_width(75); window->m_reset_button->on_click = [window = window->make_weak_ptr()](auto) mutable { for (auto& tab : window->m_tabs) { tab.reset_default_values();