summaryrefslogtreecommitdiff
path: root/Applications/FileManager
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-30 03:53:37 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-30 03:53:37 +0100
commitbc0658ce27833f990ca2c4c83088a6cd57ac2e17 (patch)
tree1494e0ad39c6c5104ca52052c3de06bf113fd2a7 /Applications/FileManager
parent5b1a6d7c666ccdb9430b7012ed8a2ae5d387bff8 (diff)
downloadserenity-bc0658ce27833f990ca2c4c83088a6cd57ac2e17.zip
FileManager: Use GUI::SeparatorWidget in the properties dialog
This looks a lot better than putting a GUI::Frame in there.
Diffstat (limited to 'Applications/FileManager')
-rw-r--r--Applications/FileManager/PropertiesDialog.cpp11
-rw-r--r--Applications/FileManager/PropertiesDialog.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/Applications/FileManager/PropertiesDialog.cpp b/Applications/FileManager/PropertiesDialog.cpp
index a2fcf365ab..9778c6a227 100644
--- a/Applications/FileManager/PropertiesDialog.cpp
+++ b/Applications/FileManager/PropertiesDialog.cpp
@@ -34,6 +34,7 @@
#include <LibGUI/FilePicker.h>
#include <LibGUI/LinkLabel.h>
#include <LibGUI/MessageBox.h>
+#include <LibGUI/SeparatorWidget.h>
#include <LibGUI/TabWidget.h>
#include <grp.h>
#include <limits.h>
@@ -84,7 +85,7 @@ PropertiesDialog::PropertiesDialog(const String& path, bool disable_rename, Wind
};
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/properties.png"));
- make_divider(general_tab);
+ general_tab.add<GUI::SeparatorWidget>(Gfx::Orientation::Horizontal);
struct stat st;
if (lstat(path.characters(), &st)) {
@@ -135,7 +136,7 @@ PropertiesDialog::PropertiesDialog(const String& path, bool disable_rename, Wind
make_property_value_pairs(properties, general_tab);
- make_divider(general_tab);
+ general_tab.add<GUI::SeparatorWidget>(Gfx::Orientation::Horizontal);
make_permission_checkboxes(general_tab, { S_IRUSR, S_IWUSR, S_IXUSR }, "Owner:", m_mode);
make_permission_checkboxes(general_tab, { S_IRGRP, S_IWGRP, S_IXGRP }, "Group:", m_mode);
@@ -299,9 +300,3 @@ GUI::Button& PropertiesDialog::make_button(String text, GUI::Widget& parent)
button.set_fixed_size(70, 22);
return button;
}
-
-void PropertiesDialog::make_divider(GUI::Widget& parent)
-{
- auto& divider = parent.add<GUI::Frame>();
- divider.set_fixed_height(2);
-}
diff --git a/Applications/FileManager/PropertiesDialog.h b/Applications/FileManager/PropertiesDialog.h
index 5c9b607235..ad95d8ae23 100644
--- a/Applications/FileManager/PropertiesDialog.h
+++ b/Applications/FileManager/PropertiesDialog.h
@@ -77,7 +77,6 @@ private:
}
GUI::Button& make_button(String, GUI::Widget& parent);
- void make_divider(GUI::Widget& parent);
void make_property_value_pairs(const Vector<PropertyValuePair>& pairs, GUI::Widget& parent);
void make_permission_checkboxes(GUI::Widget& parent, PermissionMasks, String label_string, mode_t mode);
void permission_changed(mode_t mask, bool set);