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 404571 - Scroll arrow backgrounds should be painted with different detail
Scroll arrow backgrounds should be painted with different detail
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-02-05 12:34 UTC by Tommi Komulainen
Modified: 2008-05-28 01:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (698 bytes, patch)
2007-02-05 12:36 UTC, Tommi Komulainen
needs-work Details | Review
New diff against trunk (859 bytes, patch)
2008-05-21 09:16 UTC, Christian Dywan
committed Details | Review

Description Tommi Komulainen 2007-02-05 12:34:11 UTC
Painting the scroll arrow backgrounds with the same details as the menu background confuses the theming as there's no way to distinguish between the two paintings in gtkrc (all parameters except coordinates are the same.) As a result the menu looks really bad with pixmap engine when you try to paint a nice border around the menu.

The arrows background should be painted with different detail parameter.
Comment 1 Tommi Komulainen 2007-02-05 12:36:20 UTC
Created attachment 81923 [details] [review]
proposed patch

 * gtk/gtkmenu.c (gtk_menu_paint): Paint the scroll arrow backgrounds using 'menu_scroll_arrow_up' and 'menu_scroll_arrow_down' details instead of generic 'menu'
Comment 2 Matthias Clasen 2007-02-05 13:41:45 UTC
shouldn't "menu-scroll-arrow" be good enough, considering the up/down is already provided for the direction of the arrow ? 
Also, have you verified that this does not cause regressions with exisiting theme engines ?
Comment 3 Tommi Komulainen 2007-02-05 14:28:43 UTC
(In reply to comment #2)
> shouldn't "menu-scroll-arrow" be good enough, considering the up/down is
> already provided for the direction of the arrow ?

Not really as the arrow direction is not known while painting the background. Of course one could do interesting hacks based on coordinates inside the theme engine, but that would be awkward.


> Also, have you verified that this does not cause regressions with exisiting
> theme engines ?

Unfortunately no.
Comment 4 Michael Natterer 2007-02-08 11:58:20 UTC
I think we should just live with this possible minor breakage of theme
engines, it's IMHO less worse than the current state where the
theme engine has no chance whatsoever to draw the buttons differently
from the menu's main background box.
Comment 5 Philip Withnall 2007-05-26 16:51:07 UTC
Patch 81923 doesn't apply cleanly. Reviewing it would take little time.

(Working on http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00148.html)
Comment 6 Christian Dywan 2008-05-21 09:16:20 UTC
Created attachment 111275 [details] [review]
New diff against trunk

The original patch indeed doesn't apply on trunk. This is a new diff wit the same changes.

I share the opinion that this little change won't do much harm while it helps theme authors.
Comment 7 Matthias Clasen 2008-05-24 00:32:03 UTC
Ok, given the fact that scrolling menus are relatively rare (and basically a ui glitch whenever they occur), I'm not going to consider minor theme breakage to be a problem.
Comment 8 Matthias Clasen 2008-05-28 01:31:10 UTC
        Bug 404571 – Scroll arrow backgrounds should be painted with different
        detail

        * gtk/gtkmenu.c (gtk_menu_paint): Use "menu_scroll_arrow_up/down"
        as detail when drawing scroll arrow backgrounds. Proposed by
        Tommi Komulainen.