Browse Source

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.
Andreas Kling 4 năm trước cách đây
mục cha
commit
c28a3a385b
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      Userland/Libraries/LibGUI/FilePicker.cpp

+ 2 - 1
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()) {