mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibGUI: Make the Open button always active in the OpenFolder mode
We can just use the current opened directory as a path in that mode. :^)
This commit is contained in:
parent
71185f91a8
commit
5d567eb4ac
1 changed files with 2 additions and 2 deletions
|
@ -179,7 +179,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& filen
|
|||
ok_button.on_click = [this](auto) {
|
||||
on_file_return();
|
||||
};
|
||||
ok_button.set_enabled(!m_filename_textbox->text().is_empty());
|
||||
ok_button.set_enabled(m_mode == Mode::OpenFolder || !m_filename_textbox->text().is_empty());
|
||||
|
||||
auto& cancel_button = *widget.find_descendant_of_type_named<GUI::Button>("cancel_button");
|
||||
cancel_button.set_text("Cancel");
|
||||
|
@ -188,7 +188,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& filen
|
|||
};
|
||||
|
||||
m_filename_textbox->on_change = [&] {
|
||||
ok_button.set_enabled(!m_filename_textbox->text().is_empty());
|
||||
ok_button.set_enabled(m_mode == Mode::OpenFolder || !m_filename_textbox->text().is_empty());
|
||||
};
|
||||
|
||||
m_view->on_selection_change = [this] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue