Community
Participate
Working Groups
Created attachment 164636 [details] ReSkinnerHandler.java If I re-style the application via CSSEngine it seems that I cannot remove any set styles. How can I set the styling back to SWT default / remove any styling? I attach an example of an handler who re-style an application.
Hi Lars, When I have developped CSS engine I have done several errors. The reset of CSS property is a sample of my error, and it is not very good managed. Indead when CSSEngine apply styles for the first time, it get the current property (color, font....) for each widget and store it as default values. When CSSEngine is reseted or when new style must be applyed, default value computed is applyed. So the reset styles doesn't apply SWT default and it's a big error! I would like refactor CSSEngine to manage correctly reset CSS property, but before that we should split SWTElement per SWT Widget (WidgetElement <- ControlElement...). I have seen your bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=308931 ([CSS] Ability to style menus.) and IHMO I think split SWTElement per SWT Widget should be done before developping this feature WidgetElement sould implement EMF like PropertyDescriptor : PropertyDescriptor#getPropertyalue(String name) PropertyDescriptor#resetPropertyalue(String name) ... I would like do that since very long time, but i'm waiting decision of Bogdan to start this big refactoring. Regards Angelo
Hi Angelo, thanks for your detailed reply. I'm adding Bogdan to get his opinion on the refactoring. Best regards, Lars
Marking as invalid. To remove styling you have to override the properties with your new styling.