Hi,
This is my gtkrc-2.0 file and it works fine. Check the way to set the style.
Regards,
Rashid
/////////gtkrc-2.0//////////////////////////////////////////
include "/opt/gnome/share/themes/Grand-Canyon/gtk-2.0/gtkrc"
style "user-font"
{
font_name="Sans 12"
}
widget_class "*" style "user-font"
/////////////////////////////////////////////////////////////////
On 09/06/2009, chunlong84 <[email protected]> wrote:
>
> I don't know why the below method is wrong:
>
> The gtkrc file :
>
> pixmap_path "./icons"
>
> style "new_btn" {
>
> engine "pixmap"
>
> {
>
> image
>
> {
>
> function = BOX
>
> recolorable = TRUE
>
> state = NORMAL
>
> stretch = TRUE
>
> file = "btn2.png"
>
> }
>
> image
>
> {
>
> function = BOX
>
> recolorable = TRUE
>
> state = PRELIGHT
>
> stretch = TRUE
>
> file = "btn22.png"
>
> }
>
> image
>
> {
>
> function = BOX
>
> recolorable = TRUE
>
> state = ACTIVE
>
> stretch = TRUE
>
> file = "btn22.png"
>
> }
>
> }
>
> }
> widget "abc" style "new_btn"
>
> source code:
>
> MyWindow::MyWindow()
> {
> Gtk::RC::parse_string("./gtkrc");
> btnNew.set_size_request(100,100);
> btnNew.set_name("abc");
> }
>
> execution result:
> -:1: error: scanner: unknown error - e.g. `style'
>
>
> _______________________________________________
> gtkmm-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list