mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
FileManager: Exit the properties window on escape
This commit is contained in:
parent
3e6e75bb5e
commit
c5a6f0fb4d
|
@ -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…
Reference in a new issue