mirror of
https://github.com/RGBCube/serenity
synced 2025-10-27 22:52:34 +00:00
5 KiB
5 KiB
Widget
Defines a GUI widget.
@GUI::Widget {
fixed_width: 250
fixed_height: 215
fill_with_background_color: true
layout: @GUI::VerticalBoxLayout {
}
}
Registered Properties
| Property | Type | Possible values | Description |
|---|---|---|---|
| x | int | ||
| y | int | ||
| visible | bool | ||
| focused | bool | ||
| enabled | bool | ||
| tooltip | string | ||
| min_size | size | ||
| max_size | size | ||
| width | int | ||
| height | int | ||
| min_width | int | ||
| min_height | int | ||
| max_width | int | ||
| max_height | int | ||
| fixed_width | int | ||
| fixed_height | int | ||
| fixed_size | size | ||
| shrink_to_fit | bool | ||
| font | string | ||
| font_size | int | ||
| font_weight | font_weight | ||
| font_type | enum | FixedWidth, Normal | |
| foreground_color | color | ||
| foreground_role | string | ||
| background_color | color | ||
| background_role | string | ||
| fill_width_background_color | bool | ||
| layout | widget | @GUI::VerticalBoxLayout, @GUI::HorizontalBoxLayout | |
| relative_rect | rect | ||
| focus_policy | enum | ClickFocus, NoFocus, TabFocus, StrongFocus | |
| margins |