Skip to content

[Theming] Expand the scope of button shaper to all components #557

@kirill-grouchnikov

Description

@kirill-grouchnikov

Today, RadianceButtonShaper is only used to provide configurability of button shapes - between classic (slightly rounded), pill (fully rounded) and polygon-based in the shaper pack extras. The rest of the places mostly use the internal RadianceSizeUtils.getClassicButtonCornerRadius API for computing the corner radius of components such as comboboxes, checkbox marks, slider thumbs, progress bars, tabbed pane tabs, and more. Most of that is now routed through the recently added RadianceOutlinePainter.ShapeSupplier interface, whose implementations are mostly copy-pasted in multiple UI delegates.

Here is a simple use case that has absolutely no coverage with Radiance APIs - external or internal. Make all components - buttons, checkboxes, scroll bars, progress bars, etc - use square corners. There is no way to achieve what looks to be a fairly simple task. Another, smaller use case is to be able to configure corner radius for menu item highlights.

This issue will track a new skin-level API surface, tentatively called component shaper. This API will be used by all component UI delegates to compute the shape of the relevant component visuals, and it will also be exposed for specific skins to configure component shape for that particular skin.

Metadata

Metadata

Labels

FutureFor further consideration

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions