FileManager: Exit the properties window on escape
This commit is contained in:
parent
3e6e75bb5e
commit
c5a6f0fb4d
Notes:
sideshowbarker
2024-07-17 02:35:27 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/c5a6f0fb4d Pull-request: https://github.com/SerenityOS/serenity/pull/19907
2 changed files with 6 additions and 0 deletions
|
@ -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 {};
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ private:
|
|||
RefPtr<GUI::ImageWidget> m_icon;
|
||||
RefPtr<GUI::Label> m_size_label;
|
||||
RefPtr<DirectoryStatisticsCalculator> m_directory_statistics_calculator;
|
||||
RefPtr<GUI::Action> m_on_escape;
|
||||
DeprecatedString m_name;
|
||||
DeprecatedString m_parent_path;
|
||||
DeprecatedString m_path;
|
||||
|
|
Loading…
Add table
Reference in a new issue