GNOME Bugzilla – Bug 679327
Children of GtkOverlay are incorrectly rendered when using OSD style class
Last modified: 2012-07-04 07:32:28 UTC
Created attachment 217929 [details] Screenshot showing the problem It seems the problem is that OSD style class makes GtkOverlay to have a transparent background. This can be reproduced with epiphany, but it can be easily reproducible with gtk3-demo too, just by adding: gtk_style_context_add_class (gtk_widget_get_style_context (overlay), GTK_STYLE_CLASS_OSD); to the overlay demo. See the attached screenshot. This is with gtk+ and gnome-themes-standard from current git master.
I believe this is just a theming problem; entries with the OSD style haven't been implemented yet in the theme (but I'd really like to!). What kind of interface are you writing?
The main problem is the context menu, as you can see in the screenshot. If the context menu is attached to the widget inside the olverlay (gtk_menu_attach_to_widget), as GtkEntry does for example, it's rendered wrong. But you might want to add any kind of widget to a GtkOverlay, and it should just work.
(In reply to comment #2) > The main problem is the context menu, as you can see in the screenshot. If the > context menu is attached to the widget inside the olverlay > (gtk_menu_attach_to_widget), as GtkEntry does for example, it's rendered wrong. > But you might want to add any kind of widget to a GtkOverlay, and it should > just work. I agree we shouldn't try to override the style when there are widgets that we don't support a different style for. I now pushed a patch to git master that should fix this, but please let me know if you need any other specific widget with a different OSD style and we'll try to implement it.
It fixed the issue, thank you very much!