mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
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.
This commit is contained in:
parent
2560d0b9ad
commit
7b41a09540
1 changed files with 1 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue