summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-06 19:33:58 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-06 21:07:04 +0200
commitc28a3a385bd975ed0454c9710ac04a6818e14c7b (patch)
treefa0b878a3c1e48191c730d4b1347f2b6dc37329c /Userland/Libraries/LibGUI
parent33d9b592cd5a8a13168fb53eba8f9e5ef5e07fd7 (diff)
downloadserenity-c28a3a385bd975ed0454c9710ac04a6818e14c7b.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/FilePicker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/FilePicker.cpp b/Userland/Libraries/LibGUI/FilePicker.cpp
index 022dfcd772..fbca7fc9a2 100644
--- a/Userland/Libraries/LibGUI/FilePicker.cpp
+++ b/Userland/Libraries/LibGUI/FilePicker.cpp
@@ -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()) {