Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Better OS-Themes

I agree this functionality should be added.  More comments below.

- B



From: Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx>
To: E4 Project developer mailing list <e4-dev@xxxxxxxxxxx>
Date: 03/18/2013 04:32 AM
Subject: [e4-dev] Better OS-Themes
Sent by: e4-dev-bounces@xxxxxxxxxxx





Hi,

Bogdan fixed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402530 so
people have access to native OS-Color constants.

Still I think this is not good enough as a replacement for the Themes
stuff in 3.x because there one could do calculations based on those colors.

I hacked such custom colors in 4.2 in
https://github.com/tomsontom/e4-e3theme/tree/master/at.bestsolution.e4.theme.css
but I think this should be generalized.

I don't have the time to do this but I think we should:
a) provide a possibility to registering custom colors


Currently there is the CSS2ColorHelper and the CSSSWTColorHelper but those can only be used to get registered colors. I'm guessing you want something more like the JFace ColorRegistry? (so you can define some custom colors you can use by name in the stylesheets?)

I was also thinking it would be useful to have some a way of sharing colors across style sheets (i.e. implement some type of CSS variable support in the engine). That would let you define all your colors at the start of the stylesheet and refer to them by name from there on. Thoughts?

b) provide access to functions to CSS to derive colors from a base one
  - as an inspiration take a look at the 2 colors JavaFX is using -
http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typecolor
(search for derive/ladder)

It makes sense to offer the same features that were available in 3.x. I'm thinking of adding support in the engine for the existing 3.x color factories:

RGBBlendColorFactory -> becomes blend(color1, color2, blendRatio)
RGBContrastFactory -> becomes contrast(fg, bg1, bg2)
RGBBrightnessFactory -> becomes shade(color, brightness factor)

There was one more factory LightColorFactory which produced colors based on focus color. Instead of providing an implementation for that one, maybe making the color factory extensible would be enough to allow users to write whatever kind of factories they need.


Tom

--
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                 geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
http://www.BestSolution.at                      phone    ++43 512 935834
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev




Back to the top