On 09/27/2010 01:44 PM, Patrick Shirkey wrote:
On Sun, September 26, 2010 1:35 pm, pete shorthose
wrote:
> WRT the recent discussion about pixmap knob widgets and theme
> conformance (that i can't reply to since i wasn't on the list
> at the time, sorry)
AFAICS, no one mentioned themable pixmap knobs. When it came to supporting
themes, it was all about vector drawing, especially with Cairo.
[...]
> another possibility that was briefly discussed for
use with
> phat was that of a composite widget with different layers that
> could be drawn separately, one on top of the other. eg render an SVG
> or pixmap as a background on the first pass, then draw something
> with cairo (a value indicator..) on top.
Yes, I did mention this SVG idea, but it was pointed out that it won't work
because some lines/borders need to be 1px or so, no matter what the scale factor is.
[...}
there are
obvious limits to what you can achieve with this kind of
thing,
Like what exactly? Pretty much only what the mind can think of. Anything
you can achieve in inkscape or gimp will be possible with cairo. That is
much more than most widgets will ever need.
Agreed. IMO, for proper scaling and theme support, the only solution is to draw
everything in code, with Cairo for instance.
Thus, the most obvious possibility is simplified knobs as those designed by
Thorwil, which use very few colors.
Another solution, for more graphical knobs, would be to expose specific GTK
style properties, which themes would have to explicitly support. That could
allow for all sort pretty rendering, with theme-specific gradients and so on.
One thing though, as you seem to be into gtk engine development, is that IIUC,
the whole Cairo idea defeats the general principle of engines which seem to rely
on the fact that widgets are drawn with gtk_paint_*() functions. Is this correct?
--
Olivier