1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

FileManager: Exit the properties window on escape

This commit is contained in:
Lucas CHOLLET 2023-07-09 12:12:18 -04:00 committed by Andreas Kling
parent 3e6e75bb5e
commit c5a6f0fb4d
2 changed files with 6 additions and 0 deletions

View file

@ -181,6 +181,11 @@ ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename)
m_directory_statistics_calculator->start();
}
m_on_escape = GUI::Action::create("Close properties", { Key_Escape }, [this](GUI::Action&) {
if (!m_apply_button->is_enabled())
close();
});
update();
return {};
}