Skip to content

Commit 487a37d

Browse files
committed
docs: add widget part docs
1 parent 304068b commit 487a37d

33 files changed

Lines changed: 523 additions & 160 deletions

docs/built_in_widgets/lv_arc.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/ar
2525

2626
## Properties
2727

28+
### Parts
29+
30+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
31+
32+
| Part | Description |
33+
| --- | --- |
34+
| `main` | The background arc: `arc_color`, `arc_width`, `arc_opa`, `arc_rounded` and `arc_image_src`. Background properties draw a box behind it. |
35+
| `indicator` | The value arc drawn over the background: the arc_* properties. Its padding is relative to the background arc. |
36+
| `knob` | The handle at the end of the indicator: background, border, shadow and padding properties (padding enlarges it). |
37+
2838
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
2939

3040
| Property | Type | Description |

docs/built_in_widgets/lv_bar.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,21 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/ba
3333

3434
## Properties
3535

36+
### Parts
37+
38+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
39+
40+
| Part | Description |
41+
| --- | --- |
42+
| `main` | The bar's background track: background properties. padding shrinks the indicator in the respective direction. |
43+
| `indicator` | The filled portion that shows the value: background properties. |
44+
3645
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
3746

3847
| Property | Type | Description |
3948
| --- | --- | --- |
40-
| `min_value` | `int` | Set the minimum value of the bar |
41-
| `max_value` | `int` | Set the maximum value of the bar |
49+
| `min_value` | `int` | Set the minimum value of the bar. . If `min_value` > `max_value` fills from the right. |
50+
| `max_value` | `int` | Set the maximum value of the bar. If `min_value` > `max_value` fills from the right |
4251
| `value` | `int` | Set the current value of the bar |
4352
| `value-animated` | `bool` | Animate the bar when changing its value. Reference as `value-animated` (default: `false`) |
4453
| `start_value` | `int` | Set the start value in range mode |

docs/built_in_widgets/lv_button.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/bu
1515

1616
## Properties
1717

18+
### Parts
19+
20+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
21+
22+
| Part | Description |
23+
| --- | --- |
24+
| `main` | Style the whole button: background, border, outline, shadow and padding. Combine with state selectors (pressed, checked, disabled, focused) for feedback. |
25+
1826
This widget adds no XML properties of its own — it inherits the full API of the [Base Widget (`lv_obj`)](./lv_obj). See [API](../syntax/api) for how the `<api>` works.

docs/built_in_widgets/lv_buttonmatrix.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/bu
5050

5151
## Properties
5252

53+
### Parts
54+
55+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
56+
57+
| Part | Description |
58+
| --- | --- |
59+
| `main` | The background behind the buttons: background properties. `pad_row` and `pad_column` set the gaps between buttons. |
60+
| `items` | The buttons: text and background properties (transforms are not applied). Combine with the 'checked', 'pressed', 'focused' and 'disabled' states, e.g. items\|checked. |
61+
5362
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
5463

5564
| Property | Type | Description |

docs/built_in_widgets/lv_calendar.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/ca
1515

1616
## Properties
1717

18+
### Parts
19+
20+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
21+
22+
| Part | Description |
23+
| --- | --- |
24+
| `main` | The calendar background: background and padding properties. |
25+
| `items` | The day cells and weekday names (built on a button matrix): background and text properties. Weekday names and days outside the shown month (disabled) are drawn without background/border. Today's thicker border and the highlighted days' fill/border are forced to the theme's primary color in code, so they are not set via style properties. |
26+
1827
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
1928

2029
| Property | Type | Description |

docs/built_in_widgets/lv_canvas.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,12 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/ca
1414

1515
## Properties
1616

17+
### Parts
18+
19+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
20+
21+
| Part | Description |
22+
| --- | --- |
23+
| `main` | Style the area behind/around the drawn buffer: background, border and padding. The pixels are drawn by the user-set buffer. |
24+
1725
This widget adds no XML properties of its own — it inherits the full API of the [Base Widget (`lv_obj`)](./lv_obj). See [API](../syntax/api) for how the `<api>` works.

docs/built_in_widgets/lv_chart.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/ch
4343

4444
## Properties
4545

46+
### Parts
47+
48+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
49+
50+
| Part | Description |
51+
| --- | --- |
52+
| `main` | The background and the division lines: background properties, plus the line properties (`line_color`/width/dash) for the division lines. `pad_column` sets the space between `BAR` column groups. |
53+
| `items` | The data series body. For LINE charts the connecting lines use the line properties (`line_color`, `line_width`, line_dash, `line_rounded`). For BAR charts the bars use the background properties (`bg_color`, `radius`, border). `pad_column` sets the gap between bars on the same X. |
54+
| `indicator` | The point markers drawn at each value on LINE and SCATTER charts: `width`/`height` set the marker size, `bg_color` its fill and `radius` its roundness; border, outline, and shadow properties also apply. |
55+
| `cursor` | The cursors: the line properties draw the crosshair lines and the marker at the cursor point uses `width` together with `bg_color`/`radius`. |
56+
| `scrollbar` | The scrollbar shown when the chart is zoomed/scrolled: `width` (thickness), background properties and padding. |
57+
4658
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
4759

4860
| Property | Type | Description |

docs/built_in_widgets/lv_checkbox.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/ch
1515

1616
## Properties
1717

18+
### Parts
19+
20+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
21+
22+
| Part | Description |
23+
| --- | --- |
24+
| `main` | The label and its area: text properties; `pad_column` sets the gap between the tick box and the text. |
25+
| `indicator` | The tick box: background, border, shadow and padding properties. `bg_image_src` sets the check icon. Use the 'checked' state (e.g. indicator\|checked) for the checked look. |
26+
1827
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
1928

2029
| Property | Type | Description |

docs/built_in_widgets/lv_dropdown.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/dr
1515

1616
## Properties
1717

18+
### Parts
19+
20+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
21+
22+
| Part | Description |
23+
| --- | --- |
24+
| `main` | The closed button: background and text properties. Gets the 'checked' state while the list is open. |
25+
| `indicator` | The symbol shown next to the text (set via `symbol`): `image_recolor` and `image_recolor_opa`. |
26+
1827
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
1928

2029
| Property | Type | Description |
@@ -32,4 +41,12 @@ The dropdown list object for styling or customization
3241

3342
_access `get` · returns `lv_obj`_
3443

44+
**Parts**
45+
46+
| Part | Description |
47+
| --- | --- |
48+
| `main` | The open list background: background, border and padding. `max_height` caps the open list size. |
49+
| `scrollbar` | The list's scrollbar: `width` (thickness), background properties and padding on the respective side. |
50+
| `selected` | The highlighted option: background and text properties. The 'checked' state styles the currently selected option and 'pressed' the one being pressed/keyed. |
51+
3552
_No attributes — created as an empty child._

docs/built_in_widgets/lv_gif.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Learn more in the [LVGL Open documentation](https://lvgl.io/docs/open/widgets/gi
1414

1515
## Properties
1616

17+
### Parts
18+
19+
Style parts of the widget with local style (e.g. `style_bg_color-knob="0xff0000"`) or with style sheets (e.g. `<style name="style_knob" selector="knob">`). See [Styles](../syntax/styles) to learn more.
20+
21+
| Part | Description |
22+
| --- | --- |
23+
| `main` | Style the GIF: `image_recolor`, `image_recolor_opa` and `image_opa`. Background, border, etc can be added too. |
24+
1725
Properties below are the widget's XML [`<api>`](../syntax/api); see [API](../syntax/api) for how properties, parameters and elements work.
1826

1927
| Property | Type | Description |

0 commit comments

Comments
 (0)