mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
WindowServer: Don't let modals minimize themselves
But do allow them to remain minimizable by a parent. This is a nice ergonomics fix to allow a parent window to quickly minimize and restore all its modal children.
This commit is contained in:
parent
788b16cbf8
commit
2b2c317c2d
3 changed files with 4 additions and 4 deletions
|
@ -107,7 +107,7 @@ void WindowFrame::window_was_constructed(Badge<Window>)
|
|||
m_buttons.append(move(button));
|
||||
}
|
||||
|
||||
if (m_window.is_minimizable()) {
|
||||
if (m_window.is_minimizable() && !m_window.is_modal()) {
|
||||
auto button = make<Button>(*this, [this](auto&) {
|
||||
m_window.handle_window_menu_action(WindowMenuAction::MinimizeOrUnminimize);
|
||||
});
|
||||
|
@ -136,7 +136,7 @@ void WindowFrame::set_button_icons()
|
|||
m_close_button->set_icon(m_window.is_modified() ? s_close_modified_icon : s_close_icon);
|
||||
m_close_button->set_style(button_style);
|
||||
}
|
||||
if (m_window.is_minimizable()) {
|
||||
if (m_window.is_minimizable() && !m_window.is_modal()) {
|
||||
m_minimize_button->set_icon(s_minimize_icon);
|
||||
m_minimize_button->set_style(button_style);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue