mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
ModelGallery: Add the new Model Gallery application :^)
This is an application analogous to WidgetGallery, in that it tests various capabilities of LibGUI models. Right now it is pretty bare, but as more work towards LibGUI models is done regarding persistent model indices, more demos will be added.
This commit is contained in:
parent
a8967388d3
commit
b30b7de2d2
11 changed files with 327 additions and 0 deletions
44
Userland/Demos/ModelGallery/BasicModelTab.gml
Normal file
44
Userland/Demos/ModelGallery/BasicModelTab.gml
Normal file
|
@ -0,0 +1,44 @@
|
|||
@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"
|
||||
|
||||
thickness: 2
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue