GNOME Bugzilla – Bug 706045
Set GtkBox as titlebar of the window - the background of the box is becomes transparent
Last modified: 2013-08-28 17:33:14 UTC
Created attachment 251678 [details] Screenshot If I set the GtkBox as titlebar of the window, the background of the box is becomes transparent. see image.
As a quickfix, you can put the box into an eventbox, call gtk_event_box_set_visible_window on that, and give it a style class that gives it the right background, like "titlebar". The proper longterm fix is to make the box render a background
It works fine, but if I open other window and showing that above the previous window, again - the background of the box in the previous window (which in under) is becomes transparent.
Created attachment 251696 [details] Screenshot - two windows
theme issue - looks like the event box is getting a transparent background in backdrop.
Created attachment 251919 [details] [review] stylecontext: add GTK_STYLE_CLASS_TITLEBAR define For consistency with the other stock style classes.
Created attachment 251920 [details] [review] window: set GTK_STYLE_CLASS_TITLEBAR to custom titles When a custom title is added to a GtkWindow, add the GTK_STYLE_CLASS_TITLEBAR to it, so the theme can apply the default rules for its style.
Review of attachment 251919 [details] [review]: sure ::: gtk/gtkstylecontext.h @@ +740,3 @@ + * + * A CSS class used when rendering a titlebar in a toplevel + * window. Do we put "Since: 3.10" in these ? not sure...
Review of attachment 251920 [details] [review]: I'm very slightly uneasy about adding style classes to external widgets like that, but it probably doesn't hurt
Attachment 251919 [details] pushed as 3ea0e4a - stylecontext: add GTK_STYLE_CLASS_TITLEBAR define Attachment 251920 [details] pushed as 9896b99 - window: set GTK_STYLE_CLASS_TITLEBAR to custom titles
I suppose the suggested eventbox can fly away, no?