Repository navigation
Conversation
…m Button#CreateRenderer This is also done in the renderer’s `#applyTheme` which is called in any case.
This can be used to apply custom corner radius to specific buttons. Together with `canvas.RadiusMaximum` and `canvas.RadiusNone` it is possible to create circular buttons (for squares) and rectangular ones (without rounded corners). The actual logic is only applied in the next commit to make the change in the actual test expectation more obvious.
|
On reflection I have realised this is possible without the new API - using a ThemeOverride container and adjusting the SizeNameButtonRadius (or similar). If we want to make a circle button specifically easier perhaps there is an intent based API we could add rather than exposing graphical tweaks on a widget API? |
That’s still a hack, IMO.
I’ll think about this. |
It probably is a hack if you're overriding theme to add a use-case requirement like "circle is a special button" but not if you're adjusting just this one button for some theme related desire. Therefore if this circular/pill button is declarable in an intent/behaviour API instead of graphical tweaks then addressing this with a new API does make sense. |
Description:
This PR allows to override the default button corner radius.
Thus, it is possible to create a circular button (e.g., with only an icon it).
Checklist:
Where applicable: