Forum: Ruby-Gnome 2 Apply 2 styles

Posted by Vincent Carmona (vinc-mai)
on 2010-08-14 07:29
(Received via mailing list)
Hi.

I would like to use two different styles in an application so I can
propose a compact and a normal view.
I am thinking of two differents way of doing it.

1) Writing a gtkrc-like file, parsing it and switching between the
system style and the one I have written.
2) Use a method to redefine properties I want to change.

I try both methods without success.

1)
my style file writes :
style "zik-compact"
{
  GtkTreeView ::vertical-separator = 0
}

widget "ZiK.TreeView" style "zik-compact"

I try Gtk::RC.parse function but I do not see the modification.
What am I missing ?
Can switch back and forth between two styles ?

2)
I cannot access to the vertical-separator property of a tree view via
Gtk::TreeView#style_get_property('vertical-separator')
but I do not know how to set a new value for it. It is one of the
properties I really need to change.

--
Vincent Carmona

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.