Hi
Is it possible to change the behavior of a button to remove the pressure effect when clicking?
Thank you
Alessandro
Hi Alessandro,
if you want to change that behavior only to some buttons in your application you can achieve this with a theme mixin:
Create a file called e.g. ButtonNoPress.mixin.theme and put it into your projects Theme folder.
{ "name": "ButtonsMixin", "appearances": { "buttonNotPressed": { "inherit": "button", "states": { "pressed": { "styles": { "backgroundColor": "buttonHighlight", "transform": "" }, "properties": { "textColor": "buttonText" } } } } } }
Then set the AppearanceKey property of those buttons you don´t want to see the pressure effect to buttonNotPressed
You can also add this AppearanceKey to your Theme without using a mixin if you´re using a Custom Theme.
Or if you want to change it globally for all buttons you also do it by code. If that´s the case please let me know and I´ll send you a code snippet for that.
Best regards
Frank
Please login first to submit.