GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Apr 17, 2014 1:11 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to get borders around GtkToolButtons?
PostPosted: Sun Feb 25, 2007 8:11 pm 
Offline
Familiar Face

Joined: Sat Feb 24, 2007 2:52 pm
Posts: 13
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 8:32 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
It's determined by the GTK theme/GTK resource file.

http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 8:58 pm 
Offline
Familiar Face

Joined: Sat Feb 24, 2007 2:52 pm
Posts: 13
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*)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 9:14 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
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.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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