1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:47:46 +00:00

WidgetGallery: Convert layout to GML and add new Icons gallery

This commit is contained in:
thankyouverycool 2021-03-11 15:27:09 -05:00 committed by Andreas Kling
parent 0fc81d23f4
commit 35897651af
11 changed files with 1347 additions and 514 deletions

View file

@ -0,0 +1,377 @@
@GUI::Widget {
name: "basics_tab"
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::GroupBox {
fixed_height: 95
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::HorizontalSplitter {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Frame {
name: "label_frame"
shape: "Panel"
shadow: "Sunken"
thickness: 1
layout: @GUI::VerticalBoxLayout {
margins: [4, 3, 4, 3]
}
@GUI::Label {
name: "enabled_label"
text: "Label"
}
@GUI::Label {
name: "disabled_label"
text: "Disabled"
enabled: false
}
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
margins: [4, 0, 4, 0]
}
@GUI::Label {
name: "word_wrap_label"
word_wrap: true
text_alignment: "TopLeft"
text: "Lorem ipsum sistema serenitas, per construxit klingre sed quis awesomatia, ergo salve amici."
}
}
}
@GUI::HorizontalSeparator {
}
@GUI::Widget {
fixed_height: 22
layout: @GUI::HorizontalBoxLayout {
}
@GUI::ComboBox {
name: "frame_shape_combobox"
placeholder: "Combo box"
}
@GUI::ComboBox {
placeholder: "Disabled"
enabled: false
}
@GUI::VerticalSeparator {
}
@GUI::SpinBox {
name: "thickness_spinbox"
min: 0
max: 2
}
@GUI::SpinBox {
enabled: false
}
}
}
@GUI::Widget {
fixed_height: 125
layout: @GUI::VerticalBoxLayout {
margins: [8, 3, 8, 3]
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
}
@GUI::Widget {
}
@GUI::Button {
name: "normal_button"
text: "Button"
}
@GUI::Button {
name: "disabled_normal_button"
text: "Disabled"
enabled: "false"
}
@GUI::Widget {
}
}
@GUI::VerticalSeparator {
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
}
@GUI::Widget {
}
@GUI::Button {
name: "enabled_coolbar_button"
text: "CoolBar button"
button_style: "CoolBar"
}
@GUI::Button {
name: "disabled_coolbar_button"
text: "Disabled"
enabled: "false"
button_style: "CoolBar"
}
@GUI::Widget {
}
}
}
@GUI::HorizontalSeparator {
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
fixed_width: 60
layout: @GUI::VerticalBoxLayout {
}
@GUI::Widget {
}
@GUI::RadioButton {
name: "top_radiobutton"
text: "Radio 1"
checked: true
}
@GUI::RadioButton {
name: "bottom_radiobutton"
text: "Radio 2"
}
@GUI::Widget {
}
}
@GUI::Widget {
}
@GUI::Widget {
fixed_width: 70
layout: @GUI::VerticalBoxLayout {
}
@GUI::Widget {
}
@GUI::CheckBox {
name: "top_checkbox"
text: "Checkbox"
}
@GUI::CheckBox {
name: "bottom_checkbox"
text: "Disabled"
enabled: false
}
@GUI::Widget {
}
}
@GUI::Widget {
}
}
@GUI::VerticalSeparator {
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
}
@GUI::Widget {
}
@GUI::Button {
name: "icon_button"
text: "Icon button"
}
@GUI::Button {
name: "disabled_icon_button"
text: "Disabled"
enabled: "false"
}
@GUI::Widget {
}
}
}
}
@GUI::GroupBox {
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::Widget {
fixed_height: 47
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
}
@GUI::TextBox {
placeholder: "Text box"
mode: "Editable"
}
@GUI::TextBox {
text: "Disabled"
enabled: false
}
}
@GUI::VerticalSeparator {
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
}
@GUI::TextBox {
text: "Read only"
mode: "ReadOnly"
}
@GUI::TextBox {
text: "Display only"
mode: "DisplayOnly"
}
}
}
@GUI::HorizontalSeparator {
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::TextEditor {
name: "text_editor"
placeholder: "Text editor"
}
@GUI::VerticalSeparator {
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
}
@GUI::Widget {
fixed_height: 22
layout: @GUI::HorizontalBoxLayout {
}
@GUI::ColorInput {
name: "font_colorinput"
placeholder: "Color dialog"
}
@GUI::ColorInput {
placeholder: "Disabled"
enabled: false
}
}
@GUI::Widget {
}
@GUI::Button {
name: "font_button"
text: "Font picker dialog..."
}
@GUI::Button {
name: "file_button"
text: "File picker dialog..."
}
@GUI::Button {
name: "input_button"
text: "Input dialog..."
}
@GUI::Widget {
}
}
}
@GUI::HorizontalSeparator {
}
@GUI::Widget {
fixed_height: 22
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::ComboBox {
name: "msgbox_icon_combobox"
model_only: true
}
@GUI::ComboBox {
name: "msgbox_buttons_combobox"
model_only: true
}
}
@GUI::VerticalSeparator {
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Button {
name: "msgbox_button"
text: "Message box dialog..."
}
}
}
}
}

View file

@ -0,0 +1,16 @@
@GUI::Widget {
name: "cursors_tab"
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::GroupBox {
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::TableView {
name: "cursors_tableview"
}
}
}

View file

@ -0,0 +1,16 @@
@GUI::Widget {
name: "icons_tab"
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::GroupBox {
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::TableView {
name: "icons_tableview"
}
}
}

View file

@ -0,0 +1,168 @@
@GUI::Widget {
name: "sliders_tab"
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::GroupBox {
fixed_height: 129
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::OpacitySlider {
name: "opacity_slider"
}
@GUI::HorizontalSeparator {
}
@GUI::Frame {
shape: "Panel"
shadow: "Sunken"
thickness: 1
max_width: 394
max_height: 79
layout: @GUI::VerticalBoxLayout {
margins: [1, 1, 1, 1]
}
@GUI::ImageWidget {
name: "opacity_imagewidget"
}
}
}
@GUI::Widget {
fixed_height: 88
layout: @GUI::VerticalBoxLayout {
margins: [8, 0, 8, 0]
}
@GUI::Widget {
}
@GUI::ScrollBar {
name: "enabled_scrollbar"
fixed_height: 16
fixed_width: -1
min: 0
max: 100
value: 50
}
@GUI::Widget {
}
@GUI::HorizontalSeparator {
}
@GUI::Widget {
}
@GUI::ScrollBar {
name: "disabled_scrollbar"
fixed_height: 16
fixed_width: -1
}
@GUI::Widget {
}
}
@GUI::GroupBox {
layout: @GUI::HorizontalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::VerticalProgressBar {
name: "vertical_progressbar_left"
fixed_width: 36
}
@GUI::VerticalSlider {
name: "vertical_slider_left"
knob_size_mode: "Fixed"
min: 0
max: 100
value: 100
tooltip: "Fixed"
}
@GUI::VerticalSeparator {
}
@GUI::VerticalSlider {
enabled: false
tooltip: "Disabled"
min: 0
max: 10
value: 5
}
@GUI::VerticalSeparator {
}
@GUI::VerticalProgressBar {
name: "vertical_progressbar_right"
fixed_width: 36
}
@GUI::VerticalSlider {
name: "vertical_slider_right"
knob_size_mode: "Proportional"
min: 0
max: 4
value: 0
tooltip: "Proportional"
}
}
@GUI::GroupBox {
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::HorizontalSlider {
name: "horizontal_slider_left"
knob_size_mode: "Fixed"
min: 0
max: 100
value: 0
}
@GUI::VerticalSeparator {
}
@GUI::HorizontalSlider {
enabled: false
min: 0
max: 10
value: 5
}
@GUI::VerticalSeparator {
}
@GUI::HorizontalSlider {
name: "horizontal_slider_right"
knob_size_mode: "Proportional"
min: 0
max: 5
value: 0
}
}
@GUI::HorizontalSeparator {
}
@GUI::HorizontalProgressBar {
name: "horizontal_progressbar"
fixed_height: 20
}
}
}

View file

@ -0,0 +1,10 @@
@GUI::Widget {
fill_with_background_color: true
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::TabWidget {
name: "tab_widget"
}
}

View file

@ -0,0 +1,25 @@
@GUI::Widget {
name: "wizards_tab"
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::GroupBox {
layout: @GUI::VerticalBoxLayout {
margins: [8, 8, 8, 8]
}
@GUI::Button {
name: "wizard_button"
text: "Start wizard"
}
@GUI::HorizontalSeparator {
}
@GUI::TextEditor {
name: "wizard_output"
mode: "ReadOnly"
}
}
}