summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/FilePickerDialog.gml
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-19 23:00:33 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-19 23:03:47 +0100
commita8e0671344b0d21c9413b7b09423196d5982028e (patch)
tree9e9f632101edc52feba24d472533531eff772aa8 /Userland/Libraries/LibGUI/FilePickerDialog.gml
parentcda3c5df59777defb0a66bf87b0166562653425c (diff)
downloadserenity-a8e0671344b0d21c9413b7b09423196d5982028e.zip
LibGUI: Port GUI::FilePicker to GML and improve the layout
Also remove the image preview feature as it was rather ugly. If we bring it back we should it should look good.
Diffstat (limited to 'Userland/Libraries/LibGUI/FilePickerDialog.gml')
-rw-r--r--Userland/Libraries/LibGUI/FilePickerDialog.gml74
1 files changed, 74 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/FilePickerDialog.gml b/Userland/Libraries/LibGUI/FilePickerDialog.gml
new file mode 100644
index 0000000000..1c02195230
--- /dev/null
+++ b/Userland/Libraries/LibGUI/FilePickerDialog.gml
@@ -0,0 +1,74 @@
+@GUI::Widget {
+ fill_with_background_color: true
+
+ layout: @GUI::VerticalBoxLayout {
+ margins: [4, 4, 4, 4]
+ }
+
+ @GUI::Widget {
+ shrink_to_fit: true
+
+ layout: @GUI::HorizontalBoxLayout {
+ }
+
+ @GUI::TextBox {
+ name: "location_textbox"
+ }
+
+ @GUI::ToolBar {
+ name: "toolbar"
+ }
+ }
+
+ @GUI::MultiView {
+ name: "view"
+ }
+
+ @GUI::Widget {
+ shrink_to_fit: true
+
+ layout: @GUI::VerticalBoxLayout {
+ }
+
+ @GUI::Widget {
+ fixed_height: 24
+ layout: @GUI::HorizontalBoxLayout {
+ }
+
+ @GUI::Label {
+ text: "File name:"
+ text_alignment: "CenterLeft"
+ fixed_width:80
+ }
+
+ @GUI::TextBox {
+ name: "filename_textbox"
+ }
+
+ @GUI::Widget {
+ fixed_width: 20
+ }
+
+ @GUI::Button {
+ name: "ok_button"
+ text: "OK"
+ fixed_width: 75
+ }
+ }
+ @GUI::Widget {
+ fixed_height: 24
+
+ layout: @GUI::HorizontalBoxLayout {
+ }
+
+ @GUI::Widget {
+ }
+
+ @GUI::Button {
+ name: "cancel_button"
+ text: "Cancel"
+ fixed_width: 75
+ }
+ }
+ }
+}