1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00
serenity/Userland/Demos/ModelGallery/BasicModelTab.gml
thankyouverycool f7e034d4b2 LibGfx+Userland: Merge FrameShape and FrameShadow into FrameStyle
Previously, Frames could set both these properties along with a
thickness to confusing effect: Most shapes of the same shadowing only
differentiated at a thickness >= 2, and some not at all. This led
to a lot of creative but ultimately superfluous choices in the code.

Instead let's streamline our options, automate thickness, and get
the right look without so much guesswork.

Plain shadowing has been consolidated into a single Plain style,
and 0 thickness can be had by setting style to NoFrame.
2023-04-30 05:49:46 +02:00

40 lines
1,022 B
Text

@GUI::Widget {
name: "basic_model_tab"
layout: @GUI::VerticalBoxLayout {
margins: [4]
}
@GUI::Label {
text: "Here is a basic model, displayed on a table widget. Its clients are updated via granular updates. You can add or remove items with the widgets below."
text_alignment: "CenterLeft"
fixed_height: 34
}
@GUI::TableView {
name: "model_table"
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {}
fixed_height: 30
@GUI::TextBox {
name: "new_item_name"
placeholder: "Enter some text to be added..."
}
@GUI::Button {
name: "add_new_item"
fixed_width: 22
fixed_height: 22
tooltip: "Add the text as an item to the model"
}
@GUI::Button {
name: "remove_selected_item"
fixed_width: 22
fixed_height: 22
tooltip: "Remove the selected item from the model"
}
}
}