Correct custom bar icon bounds

This commit is contained in:
Bjarne Oeverli committed 2026-10-11 22:02:37 +02:00
1 parent 201de1c0d6
commit 6575f06d53
4 files changed
+142 -3

No files matched your search

+2
View File
@@ -86,6 +86,8 @@ The `[bar]` section of a theme's `shell.toml` supplies the shared dimensions. `i
Custom `iconComponent` content also fits the shared target. Its source dimensions can be 15px or another size. The bar measures its glyph, image, or vector bounds and applies one scale without changing its aspect ratio. A source `iconSize` override does not change the rendered target. Image padding remains part of an application's tray asset.
Custom text bounds include text alignment and padding. The bar applies each shape's fill mode and alignment to `Shape.boundingRect`. Canvas and shader icons use their item bounds. Set their item size to match their artwork.
`WidgetButton` also uses the shared renderer for a single icon glyph. This covers custom command widgets and existing plugins that use `WidgetButton` with a different `fontSize`. Text labels retain their text size. Custom widgets must use `WidgetButton` or `BarIconButton` for this icon contract.
## Custom user modules