603851f6ca
This change optionally pass constraints down through hierarchy when measuring. Axis specific dependency information is bubbled back up (so future multi-pass layout may take further action). This enables f.ex wrapping textfields to adapt to content a bit better, but all layout is still done in a single pass (Still WIP on the layout branch)
87 lines
2.8 KiB
Plaintext
87 lines
2.8 KiB
Plaintext
TBLayout
|
|
distribution available
|
|
size available
|
|
TBTabContainer
|
|
tabs
|
|
TBButton: text: "Misc"
|
|
TBButton: text: "Skin"
|
|
TBButton: text: "Edit"
|
|
TBButton: text: "Speed"
|
|
TBScrollContainer: scroll-mode: y-auto
|
|
TBLayout: axis: y
|
|
TBLayout
|
|
TBLayout: skin: button_group
|
|
TBButton: text: Foo
|
|
TBButton: text: Bar
|
|
TBSeparator: gravity: all
|
|
TBButton: text: Foo Bar
|
|
TBSeparator: gravity: all
|
|
TBButton: text: "3cm wide"
|
|
lp: width: 30mm
|
|
TBButton: text: "Screen info", id: "screen-info"
|
|
TBClickLabel: text: "Check box"
|
|
TBCheckBox
|
|
TBClickLabel: text: "Radio button"
|
|
TBRadioButton
|
|
TBTextField: text: "Misc stuff:"
|
|
TBInlineSelect
|
|
TBProgressSpinner
|
|
value 1
|
|
TBSlider
|
|
TBSelectDropdown
|
|
text Dropdown
|
|
items
|
|
item: text: "Item 1"
|
|
item: text: "Item 2"
|
|
item: text: "Item 3"
|
|
item: text: "Item 4"
|
|
TBLayout
|
|
TBImageWidget: filename: "images/tb_logo.png"
|
|
TBImageWidget: filename: "images/tb_logo.png"
|
|
TBImageWidget: filename: "images/tb_logo.png"
|
|
TBImageWidget: filename: "images/image_1.png", skin: ImageFrame
|
|
TBTextField: skin: "ImageCaption", text: "Öland", gravity: bottom left right
|
|
TBLayout: axis: y
|
|
TBEditField: gravity: all, skin: 0, multiline: 1, readonly: 1, adapt-to-content: 1
|
|
text: "Testing high DPI skin positioning. Layout with skin \"Starry buttons\":"
|
|
TBContainer
|
|
TBLayout: skin: Starry buttons
|
|
TBButton: text: " A ", skin: "SpecialButton"
|
|
TBButton: text: " B ", skin: "SpecialButton"
|
|
TBButton: text: " C ", skin: "SpecialButton"
|
|
TBScrollContainer: scroll-mode: y-auto
|
|
TBLayout: axis: y, size: available
|
|
TBTextField: text: Input is not supported yet!
|
|
TBEditField: placeholder: "text", type: "text"
|
|
TBEditField: placeholder: "search", type: "search"
|
|
TBEditField: placeholder: "password", type: "password"
|
|
TBEditField: placeholder: "email", type: "email"
|
|
TBEditField: placeholder: "phone", type: "phone"
|
|
TBEditField: placeholder: "url", type: "url"
|
|
TBEditField: placeholder: "number", type: "number"
|
|
TBEditField
|
|
readonly 1
|
|
multiline 1
|
|
gravity all
|
|
styling 1
|
|
text: "<color #0794f8>Android test stuff</color>\n" \
|
|
"This is a read-only multiline textfield with styling enabled.\n"
|
|
TBEditField
|
|
multiline 1
|
|
gravity all
|
|
text: "Row 1\n" \
|
|
"Row 2\n" \
|
|
"Row 3\n" \
|
|
"Row 4\n" \
|
|
"Row 5\n" \
|
|
"Row 6\n" \
|
|
"Row 7\n" \
|
|
"Row 8\n" \
|
|
"Row 9\n" \
|
|
"Row 10"
|
|
TBLayout: axis: y
|
|
TBEditField: gravity: all, skin: 0, multiline: 1, readonly: 1, adapt-to-content: 1
|
|
text: "Some speed tests on the layout used in this demo:"
|
|
TBButton: text: "Inflate, layout, close", id: "speed test inflate"
|
|
TBButton: text: "Resize", id: "speed test resize"
|