Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Providing SWT themeable scrollbars (onWindows)

---- Original Message -----
> From: "Alex Blewitt" <alex.blewitt@xxxxxxxxx>
> To: "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
> Sent: Tuesday, 23 February, 2016 9:54:47 PM
> Subject: Re: [platform-swt-dev] Providing SWT themeable scrollbars	(onWindows)
> 
> >> 1a. If you think it should be supported, do you think it's better to have
> >> "multiple methods" or a single method with a "CSS string"?
> > 
> > Hard to say, but I think Alex plans the CSS support anyway for SWT, in
> > this case a CSS string should be reused.
> 
> The SWT is a reusable standalone component which doesn’t have any external
> dependencies. The CSS support in Eclipse 4 brings in a lot of baggage:
> 
> * org.eclipse.e4.ui.css.swt ->
> |- org.eclipse.e4.ui.css.core ->
> |- org.apache.batik.css ->
> \- org.apache.batik.util ->
>  \- org.apache.batik.util.gui ->
> | - org.w3.dom.svg ->
> \- org.w3.dom.smil ->
>   \- org.w3.dom.events
> |- org.w3.css.sac
> 
> Partly that’s because of the Batik parser (why does a parser depend on a
> GUI?) but in order to maintain SWT to be a single dependency you’d need to
> in-line whatever CSS parsing support was required in order to theme it. And
> that probably doesn’t fit in with the goal of making SWT lightweight and
> able to run on small devices, which has been a goal in the past.

Not the place in this thread, but what I have in mind shares nothing with the CSS support in platform.ui. My idea is to make use of the styling capabilities of the underlying toolkit (GTK in my case) and feed it with CSS (almost)directly. That would be way more flexible and full css support actually (see https://developer.gnome.org/gtk3/stable/GtkCssProvider.html for details) and not requiring you to parse css and reinvent all the machinery, should be fully in the spirit of SWT - a thin wrapped on top of the OS provided support. And no additional deps for SWT for sure :). Due to Win/Cocoa not having such capabilities(at least I'm not aware of them - feel free to point me to it or best if you know how to do it for them let's have a call and discuss details) it's not feasible work for SWT for now, although worth trying to see what will come out of it when I have time to play with it. In any case such attempt is not for this thread so if there is someone interested in continuing on it, please start a new one.

Regards, 
Alex

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


Back to the top