GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get borders around GtkToolButtons?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Warp
Familiar Face


Joined: 24 Feb 2007
Posts: 13

PostPosted: Sun Feb 25, 2007 8:11 pm    Post subject: How to get borders around GtkToolButtons? Reply with quote

I'm creating a GtkToolbar which contains GtkToolButtons labelled with text only.

By default it seems that these GtkToolButtons don't have any borders (except when hovering with the mouse). Since these buttons contain text only, it makes the toolbar somewhat confusing because it just looks like one long line of text. It would be much clearer if the buttons had borders.

I can't find any way of telling Gtk to put borders around those buttons. Is there a way?
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 427
Location: Portland, OR USA

PostPosted: Sun Feb 25, 2007 8:32 pm    Post subject: Reply with quote

It's determined by the GTK theme/GTK resource file.

http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html
Back to top
Warp
Familiar Face


Joined: 24 Feb 2007
Posts: 13

PostPosted: Sun Feb 25, 2007 8:58 pm    Post subject: Reply with quote

So there's no function I can call to force those borders around the buttons?

Currently it looks quite bad. (Whoever thought that not having borders around buttons was a good idea? *sigh*)
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 427
Location: Portland, OR USA

PostPosted: Sun Feb 25, 2007 9:14 pm    Post subject: Reply with quote

Well, it may seem odd at first, but that's actually one of the benefits of GTK+. The appearance of your GUI applications are determined by the theme. This allows users to customize the app to suite their needs (if they have bad eyes and need larger widgets and higher contrast, etc.)

If you application is going to be deployed as a typical application might-- different systems, screens, platforms, etc. you don't want to specify things like that. However, if it's going to be deployed on a known system (such as a touchscreen for a digital juke box) then you can use a customized gtkrc file.

For your particular issue, why not just use GtkButtons in a GtkHBox? Since you don't seem to be using the toolbar the way a standard toolbar would be.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP