mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
FileManager: Use GUI::SeparatorWidget in the properties dialog
This looks a lot better than putting a GUI::Frame in there.
This commit is contained in:
parent
5b1a6d7c66
commit
bc0658ce27
Notes:
sideshowbarker
2024-07-19 00:24:36 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bc0658ce278
2 changed files with 3 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue