Open LouisePla opened 3 days ago
The visual cascading effect is normal because of the addStamp: in the ToInstallSkinEvent rule. The image need to be installed directly with the right scaled form. The solution I see is to use the withParent: selector.
self
select: (ToImage asTypeSelector withParent: #bigButton asStampSelector)
style: [
self
when: ToInstallSkinEvent
write: (self property: #innerImage)
with: [ :e |
| newSize form newScale |
newSize := 200 asPoint.
form := e innerFormImage copy.
newScale := newSize / form extent.
(form magnifyBy: (newScale x max: newScale y)) ] ]
I would like to add stamps in rules declaration to manage button image size but when I use it, I see the icon resizing.
Launching the test, the icon is small (the stamp is not applied)
After 1 second, the icon have the correct size :
I add the method with big icon ToButton rules (called in ToBeeTheme > initializeStyleRules:)
I test with the code below :