LibGUI: Tweak order of common location buttons in FilePicker

Let's put the root directory up top so the buttons are in order of
directory specificity.
This commit is contained in:
Andreas Kling 2021-04-06 19:33:58 +02:00
parent 33d9b592cd
commit c28a3a385b
Notes: sideshowbarker 2024-07-18 20:43:17 +09:00

View file

@ -237,9 +237,10 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& file_
};
return button;
};
auto& root_button = add_common_location_button("Root", "/");
auto& home_button = add_common_location_button("Home", Core::StandardPaths::home_directory());
auto& desktop_button = add_common_location_button("Desktop", Core::StandardPaths::desktop_directory());
auto& root_button = add_common_location_button("Root", "/");
m_model->on_complete = [&] {
if (m_model->root_path() == Core::StandardPaths::home_directory()) {