After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 317361 - Add ability to draw transparent menus in CSS
Add ability to draw transparent menus in CSS
Status: RESOLVED DUPLICATE of bug 630217
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-27 18:18 UTC by Richard Stellingwerff
Modified: 2014-01-22 22:21 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Sets the colormap to RGBA, when available. (1.38 KB, patch)
2005-09-27 18:18 UTC, Richard Stellingwerff
needs-work Details | Review
[1/2] GtkMenu: apply class "menuwindow" to our GtkWindow (2.71 KB, patch)
2013-04-19 18:00 UTC, Simon McVittie
none Details | Review
[2/2] GtkWindow: try to get a 32-bit visual if we have a non-opaque background (6.88 KB, patch)
2013-04-19 18:00 UTC, Simon McVittie
none Details | Review
a quick hack to Adwaita (based on 59dd45fddbf) to demonstrate this in action (1.40 KB, text/plain)
2013-04-19 18:02 UTC, Simon McVittie
  Details
gedit 3.8 demonstrating that edited theme in use (39.54 KB, image/png)
2013-04-19 18:03 UTC, Simon McVittie
  Details

Description Richard Stellingwerff 2005-09-27 18:18:02 UTC
Change the popup's menu colormap to use an RGBA colormap, when available. This
will leave current themes unchanged, but allows for themes to use this feature
and draw transparent menus.
Comment 1 Richard Stellingwerff 2005-09-27 18:18:59 UTC
Created attachment 52737 [details] [review]
Sets the colormap to RGBA, when available.

Tested against CVS.
Comment 2 Matthias Clasen 2005-11-21 15:12:04 UTC
This probably has to be repeated when the screen is changed, and I wonder how it
plays with torn-off windows. 

Do you have some testcase that shows this in action ?
Comment 3 Matthias Clasen 2005-11-21 15:12:47 UTC
This probably has to be repeated when the screen is changed, and I wonder how it
plays with torn-off windows. 

Do you have some testcase that shows this in action ?
Comment 4 Simon McVittie 2013-04-19 18:00:20 UTC
Created attachment 241938 [details] [review]
[1/2] GtkMenu: apply class "menuwindow" to our GtkWindow

This allows styles to distinguish between these windows and other
GtkWindows: for instance, if you want rounded corners on a menu,
it's necessary to give its parent GtkWindow a transparent background.

---

I've been asked to construct a Gtk theme in which menus have rounded corners and are not completely opaque; using this bug rather than opening a new one, although Gtk has moved on considerably since 2005.

This requires some Gtk changes, but apparently nothing too drastic...
Comment 5 Simon McVittie 2013-04-19 18:00:47 UTC
Created attachment 241939 [details] [review]
[2/2] GtkWindow: try to get a 32-bit visual if we have a  non-opaque background

We assume that a 32-bit visual means it's already RGBA (Mutter shares
this assumption, for what it's worth).
Comment 6 Simon McVittie 2013-04-19 18:02:57 UTC
Created attachment 241940 [details]
a quick hack to Adwaita (based on 59dd45fddbf) to demonstrate this in action

Deliberately not marked as "patch", I don't propose that anyone should actually apply this particular theming.
Comment 7 Simon McVittie 2013-04-19 18:03:47 UTC
Created attachment 241941 [details]
gedit 3.8 demonstrating that edited theme in use
Comment 8 Simon McVittie 2013-04-23 17:26:52 UTC
> -   * We could indeed just set black instead of the color we have.

I deleted this comment because when I tried this (which would have been a minor simplification), it turned out that the colour used does make a difference.
Comment 9 William Jon McCann 2014-01-22 22:21:59 UTC

*** This bug has been marked as a duplicate of bug 630217 ***