mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGUI: Always focus the file name textbox in GUI::FilePicker
Previously we would only auto-focus it when choosing a save location. It seems nice to have the same behavior when opening a file.
This commit is contained in:
parent
a94d1626b5
commit
2bbf3b5d0b
Notes:
sideshowbarker
2024-07-19 00:30:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2bbf3b5d0bb
1 changed files with 1 additions and 1 deletions
|
@ -191,9 +191,9 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, Options options, const
|
|||
filename_label.set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
|
||||
filename_label.set_preferred_size(60, 0);
|
||||
m_filename_textbox = filename_container.add<TextBox>();
|
||||
m_filename_textbox->set_focus(true);
|
||||
if (m_mode == Mode::Save) {
|
||||
m_filename_textbox->set_text(file_name);
|
||||
m_filename_textbox->set_focus(true);
|
||||
m_filename_textbox->select_all();
|
||||
}
|
||||
m_filename_textbox->on_return_pressed = [&] {
|
||||
|
|
Loading…
Reference in a new issue