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 Nov 29, 2014 7:22 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Theming and GtkEventBox
PostPosted: Mon Mar 12, 2012 9:00 am 
Offline
Familiar Face

Joined: Fri Jan 30, 2009 9:59 am
Posts: 24
Location: Berlin / Germany
Hello
I have an application that uses a GtkToolbar. I added to the class of the StyleContext GTK_STYLE_CLASS_PRIMARY_TOOLBAR. For my currently used theme that means the toolbar is painted in dark colors.

Now I can add GtkToolButtons or any GtkWidget packed into a GtkToolItem. Everything I add is painted correcly in the style of my GtkToolbar.

But if I use a GtkEventBox to wrap some cutom widgets before adding them to the GtkToolbar, the theming does not work correctly: The background is not painted in the style of the parent GtkToolbar, but, in my case, in light colors.

How can I work around this issue?
How can I make GtkEventBox use the theming of the parent toolbar?

I need the GtkEventBox to get my events. I use gtk+ v3.2.
Any hints appreciated!


Top
 Profile  
 
 Post subject: Re: Theming and GtkEventBox
PostPosted: Mon Mar 12, 2012 11:08 am 
Offline
Familiar Face

Joined: Fri Jan 30, 2009 9:59 am
Posts: 24
Location: Berlin / Germany
Sorry for the hassle.
I just found out how to do that:

Code:
gtk_event_box_set_visible_window (false);


That way the underlying widget uses the original theming.
Regards


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] 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