Re: Apply diferent styles to diferent own classes..



On Tue, 2007-07-08 at 10:44 +0200, Iker Perez de Albeniz wrote:
> Hi, 
> 
> I'm developing a program wich has diferent windows classes, the main
> window and toolbox windows.. 
> 
> so.. 
> 
> in mi gtkrc file i define: 
> 
> class "GtkWindow" style "Default" 
> 
> and this code makes all windows look similar so what i wan is define
> diferent styles for my own classes.. 
> 
> for example: 
> 
> 
> in my program i create a HelloWorld class that is a GtkWindow with a
> button and a label and i want that this class have a diferent style
> from the main windows... 
> 
> i have read the documentation and apears someething abaut adding a
> code like this: 

Have you seen http://live.gnome.org/GnomeArt/Tutorials/GtkThemes ?


> widget "myownclass" stye "othrestyle" 
> 
> so i tried to do: 
> 
> widget "HelloWorld" style "hello-style" 

Sounds like you want to style the widgets inside the "HelloWorld" class
differently. So two points to note here:
      * widget matches on the name of the widget (set with
        gtk_widget_set_name) and not the name of the class.
      * The match you would only modify the main window, nothing inside.

What you really want is something like:

widget_class "HelloWorld.*" style "helloworld-style"

This will match against any widget inside your HelloWorld GtkWindow
subclass.


Benjamin

Attachment: signature.asc
Description: This is a digitally signed message part



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