Community
Participate
Working Groups
Created attachment 287570 [details] Example project for dynamic CSS of buttons When enabling dynamic CSS with the VM argument -D... , and using Button:checked in your css file, the initially selected button is not changed dynamically but keeps its selected style even if becoming unselected. (Initially unselected buttons update their style dynamically in a correct way.) This happens for all types of buttons that support selection (RADIO, CHECK, TOGGLE). I attached an example project that creates all types of buttons with and without images. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=577463 manifests in there as well)
Comment on attachment 287570 [details] Example project for dynamic CSS of buttons This is not the same project as the one attached to 577463 even though the zip file has the same name - sorry about that (it does not have the additional enable/disable listeners because they are not relevant for this bug entry).
Hi Wiebke, this works for me after adding a rule for the regular button. For example: Button { background:white; color:red; } The way the CSS engine works, is that if certain state is not defined no logic will run. Otherwise we would have to reset but styled of each widgets on every possible event and that would be very very slow. Please try your example with a default rule for buttons and reopen if still something is missing.
Yes, with the additional definition for Button, the behavior is now correct. Could be added to the tutorial.