GNOME Bugzilla – Bug 731187
Use csd shadows for menus
Last modified: 2014-06-10 13:14:51 UTC
Created attachment 277853 [details] [review] patch Something like this is needed to get rid of the adwaita theme engine, which currently just contains code to set up fallbacks for menu borders under non-compositing wms.
Prior art for this is in bug 660271
Review of attachment 277853 [details] [review]: The idea looks good to me, but I'm worried that this might cause problems for POPUP windows that are not menus, like tooltips. ::: gtk/gtkwindow.c @@ +1619,3 @@ priv->type = g_value_get_enum (value); + if (priv->type == GTK_WINDOW_POPUP) + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (window)), "popup"); I wonder if this wouldn't be better in GtkMenu itself instead - e.g. tooltips and others also use GTK_WINDOW_POPUP. @@ +5571,2 @@ if (priv->type == GTK_WINDOW_POPUP) + return TRUE; This will also enable CSD for tooltips and other things though...
I should mention that this has been only lightly tested, with metacity/gnome-shell and menus/comboboxes. Good point about tooltips, I'll think about that
*** Bug 731186 has been marked as a duplicate of this bug. ***
Created attachment 278068 [details] [review] Add a csd style class
Created attachment 278069 [details] [review] Allow csd for override-redirect windows
Created attachment 278070 [details] [review] GtkMenu: take csd shadows into account for placement
Created attachment 278071 [details] [review] GtkMenu: Add the menu style class to the toplevel
Created attachment 278072 [details] [review] Request csd for menus
Created attachment 278073 [details] [review] GtkTooltip: remove hardcoded tooltip drawing
Created attachment 278074 [details] [review] GtkTooltip: take csd shadows into account for placement
Created attachment 278075 [details] [review] Request csd for tooltips
Created attachment 278076 [details] [review] Add some theming for csd popups
Review of attachment 278076 [details] [review]: ::: gtk/resources/theme/gtk-default.css @@ +864,3 @@ + +.window-frame.menu { + border-color: darker (@bg_color); Lapo pointed out that the space after darker needs to go
Review of attachment 278076 [details] [review]: .
Review of attachment 278068 [details] [review]: Looks good
Review of attachment 278069 [details] [review]: Looks good
Review of attachment 278070 [details] [review]: OK
Review of attachment 278071 [details] [review]: Not a big fan of the double style class on parent and child, I can see how that could become a bit confusing. Perhaps you can just use a different one for now, and then later clean up to see if we can get away with just setting it on the toplevel?
Review of attachment 278072 [details] [review]: OK
Review of attachment 278073 [details] [review]: I'm all for this, but tooltips will stop being rounded under Metacity/non-composited WMs with this patch.
Review of attachment 278074 [details] [review]: OK
Review of attachment 278075 [details] [review]: OK
Attachment 278068 [details] pushed as 60cd707 - Add a csd style class Attachment 278069 [details] pushed as bde4e86 - Allow csd for override-redirect windows Attachment 278070 [details] pushed as e9ed210 - GtkMenu: take csd shadows into account for placement Attachment 278072 [details] pushed as dae252e - Request csd for menus Attachment 278073 [details] pushed as 49bb39e - GtkTooltip: remove hardcoded tooltip drawing Attachment 278074 [details] pushed as 179d6a4 - GtkTooltip: take csd shadows into account for placement Attachment 278075 [details] pushed as a39985a - Request csd for tooltips Attachment 278076 [details] pushed as fbc6a0c - Add some theming for csd popups