Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Custom widget is not styled

Mickael,

I might be off base on this observation, but if I recall correctly (from getting Oomph things to behave correctly with dark theme), if one subclasses Composite, your subclass is no longer styled as a composite.  And there's no simple way to mark it the instance so that it's styled according to some existing style definition. I.e., a feature to "please treat this instance as a composite" would definitely have been helpful.

It was also my observation that trying to set colors during construction is kind of a losing battle because the styling comes back later and changes the colors.  All the theme support is generally super complicated...

Regards,
Ed


On 28.09.2018 08:24, Mickael Istria wrote:
Hi,

You can directly ask this to the platform-ui-dev mailing-list. This e4 one isn't really relevant now.
About your custom widget, I guess by Custom you mean that you're actually taking care of some parts of their drawing? If so, then I believe it's up to you in your drawing routines to read the widget style and to choose the right colors for background/foreground accordingly. One possibility if you wish really dynamic results is that instead of reading the style, you simply rely on the background color of the parent composite, so you don't have to deal with CSS and your widget would be portable in any composite and integrate well in it without tweak

HTH.



_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/e4-dev


Back to the top