GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 10:09 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: remove GTK notebook border
PostPosted: Thu Oct 27, 2011 7:54 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Did you compile with gtk3 or 2? Figured you were using 3 as you had natty. _css_provider's only in 3 but you don't have to pull in anything more than gtk.h. You might be able to do it in 2 with gtk_style but I'm not sure exactly how you'd go about doing it. They don't make it as clear.
Oh and tested it further. You don't need the unico stuff. The following works better for the css (and will be platform independent):
Code:
  gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider),
                                 " .notebook {\n"
                                 "   background-color: shade (@bg_color, 1.02);\n"
                                 "   background-image: none;\n"
                                 "   border-style: none;\n"
                                 "   border-width: 0;\n"
                                 "   padding: 0;\n"
                                 "   margin: 0;\n"
                                 "}\n", -1, NULL);


Top
 Profile  
 
 Post subject: Re: remove GTK notebook border
PostPosted: Thu Oct 27, 2011 8:14 pm 
Offline
GTK+ Geek

Joined: Sat Sep 03, 2011 6:36 pm
Posts: 94
sorry,im using GTK 2 on natty 11.04


Top
 Profile  
 
 Post subject: Re: remove GTK notebook border
PostPosted: Thu Oct 27, 2011 8:19 pm 
Offline
GTK+ Geek

Joined: Sat Sep 03, 2011 6:36 pm
Posts: 94
#update

i tried this :

Code:
   gtk_rc_parse_string (
      "style \"my-notebook-style\"\n"
   "{\n"
        "   background-color: shade (@bg_color, 1.02);\n"
                                 "   background-image: none;\n"
                                 "   border-style: none;\n"
                                 "   border-width: 0;\n"
                                 "   padding: 0;\n"
                                 "   margin: 0;\n"
      "}\n"
      "widget \"*.my-notebook\" style \"my-notebook-style\"");
      

     notebook = gtk_notebook_new ();
      gtk_widget_set_name(notebook, "my-notebook");


and still i see no change :(


Top
 Profile  
 
 Post subject: Re: remove GTK notebook border
PostPosted: Sat Oct 29, 2011 2:50 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
The parameters you are trying out are .css parameters and so won't parse for gtkstyle: http://developer.gnome.org/gtk/2.24/gtk-Resource-Files.html#GtkRcStyle-struct. You may have some success with xthickness, ythickness parameters though, but I wouldn't count on it.


Top
 Profile  
 
 Post subject: Re: remove GTK notebook border
PostPosted: Sun Oct 30, 2011 7:56 pm 
Offline
GTK+ Geek

Joined: Sat Sep 03, 2011 6:36 pm
Posts: 94
any suggestions? :/


Top
 Profile  
 
 Post subject: Re: remove GTK notebook border
PostPosted: Thu Nov 17, 2011 9:08 pm 
Offline
GTK+ Geek

Joined: Sat Sep 03, 2011 6:36 pm
Posts: 94
sorry for bumping this,but is there any way to achieve css styling in gtk 2.24?


Top
 Profile  
 
 Post subject: Re: remove GTK notebook border
PostPosted: Fri Nov 18, 2011 9:35 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 764
Location: UK
As pointed out by Paul in a previous posting GTK 2.24 does not use CSS. You will need to look at GtkSyle or the various properties of the widgets you are trying to alter, if you want to change the way they look under 2.24.

E.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group