mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 18:44:27 +03:00
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. :^)
This commit is contained in:
parent
b44a7f68cd
commit
ad57a2f18b
Notes:
sideshowbarker
2024-07-19 04:42:44 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ad57a2f18b4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user