GtkStyles and RC-Files.



Hi all.

The following scenario is given:
I want to create an application that has to match certain design-criteria
given from other people with no GTK-Look&Feel knowledge. I now try to
model my application so that it matches as close as possible to the
original design.

The design involves Buttons in different areas, some are black on white,
some are white on black. Since it would be overkill to derive
GtkButtonBW and GtkButtonWB I thought about GtkStyles. Is it possible
to:

     1) have two Styles defined in a .gtkrc, named "foobw" and "foowb"
     2) get these two styles inside an application by their identifier
     3) make proper GtkStyles from these
     4) assign these Styles to the Buttons, hardcoded in the application.

I want to have the two Styles in a gtkrc, because this is an easy way to
share them across applications. Hardcoding them is kind of evil, because
you need to recompile when you want to change them.

I do not want to have the assignment done in the .gtkrc, since this needs
a lot of knowledge about the Widget-Tree to find the proper targets
(and it is bloat, because you need different gtkrc's for different apps).
A match against the Widget-Class is not possible, because as mentioned
above I don't have two Button Classes.

Or did I miss an obvious thing?

Thanks,
        Simon

PS: This is gtk+-1.2.
-- 
      Simon Budig unix-ag org       http://www.home.unix-ag.org/simon/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]