Re: [LAD] pixmap based knob widgets and theme integration.

From: hermann <brummer-@web.de>
Date: Mon Sep 27 2010 - 20:32:09 EEST

Am Montag, den 27.09.2010, 19:13 +0200 schrieb Olivier Guilyardi:
> On 09/27/2010 05:42 PM, hermann wrote:
> > Am Montag, den 27.09.2010, 15:46 +0200 schrieb Olivier Guilyardi:
> >> 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.
> >>
> >> [...]
> >
> > Oh, I do, that's exactly what we do in libgxw, use GTK Stock Icon Themes
> > to draw the Knobs and draw the Indicator with Cairo.
>
> Stock icons for knobs? In libgxw I saw a custom background pixmap. Sorry but I
> don't see how this is themable.
>
> --
> Olivier

Yes, you can define the stock icon's to use in a gtkrc file, define your
theme :

style "skin_icons"
{
  stock["bigknob"] = {{"knob3.png"}}
  stock["smallknob"] = {{"smallknob3.png"}}
  stock["eqslider"] = {{"eqslider.png"}}
}

class "GxKnob" style "skin_icons"
class "GxEQSlider" style "skin_icons"

the knob have the used icon size (witch is free) then.
You could easy change them during runtime.
also all other widgets in this library are them-able with a gtkrc style
file.
for example

style "fastmeter"
{
  GxFastMeter::clr-bottom = "#003808"
  GxFastMeter::clr-middle = "#00ff00"
  GxFastMeter::clr-top = "#ff0000"
  GxFastMeter::over = "#ff0000"
}

style "selector"
{
  fg[NORMAL] = { 0.32, 0.8, 0.16 }
  GtkRange::trough-border = 2
  GtkRange::stepper-size = 8
  GtkRange::stepper-spacing = 2
  GxRegler::value-border = { 2, 0, 0, 0 }
  font_name = "sans 7.5"
  xthickness = 10
  ythickness = 1
}

class "GxFastMeter" style:highest "fastmeter"
class "GxSelector" style:highest "selector"

regards hermann

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Sep 28 00:15:01 2010

This archive was generated by hypermail 2.1.8 : Tue Sep 28 2010 - 00:15:01 EEST