Ver código fonte

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.
Timothy Flynn 3 anos atrás
pai
commit
7b41a09540
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      Userland/Libraries/LibGUI/SettingsWindow.cpp

+ 1 - 0
Userland/Libraries/LibGUI/SettingsWindow.cpp

@@ -39,6 +39,7 @@ ErrorOr<NonnullRefPtr<SettingsWindow>> SettingsWindow::create(String title, Show
 
     if (show_defaults_button == ShowDefaultsButton::Yes) {
         window->m_reset_button = TRY(button_container->try_add<GUI::Button>("Defaults"));
+        window->m_reset_button->set_fixed_width(75);
         window->m_reset_button->on_click = [window = window->make_weak_ptr<SettingsWindow>()](auto) mutable {
             for (auto& tab : window->m_tabs) {
                 tab.reset_default_values();