diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-18 18:10:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-19 21:15:00 +0200 |
commit | ad57a2f18b4915ba57b9c9e1e9c0ddd6ff4cfe2a (patch) | |
tree | 6671aa9973ae56e35cbd56ade81f1649d260de92 /Applications/FileManager | |
parent | b44a7f68cd63a134ebaa2fc5b19132394ce5ae1e (diff) | |
download | serenity-ad57a2f18b4915ba57b9c9e1e9c0ddd6ff4cfe2a.zip |
FileManager: Use new TextBox::DisplayOnly mode in the properties dialog
Use this instead of disabling the name TextBox. This looks a little bit
nicer than the grayed-out appearance. :^)
Diffstat (limited to 'Applications/FileManager')
-rw-r--r-- | Applications/FileManager/PropertiesDialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Applications/FileManager/PropertiesDialog.cpp b/Applications/FileManager/PropertiesDialog.cpp index f56a2bbc85..47be60aa4e 100644 --- a/Applications/FileManager/PropertiesDialog.cpp +++ b/Applications/FileManager/PropertiesDialog.cpp @@ -80,7 +80,7 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo m_name_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed); m_name_box->set_preferred_size({ 0, 22 }); m_name_box->set_text(m_name); - m_name_box->set_enabled(!disable_rename); + m_name_box->set_mode(disable_rename ? GUI::TextBox::Mode::DisplayOnly : GUI::TextBox::Mode::Editable); m_name_box->on_change = [&]() { m_name_dirty = m_name != m_name_box->text(); m_apply_button->set_enabled(m_name_dirty || m_permissions_dirty); |