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 563552 - Murrine gtk2 engine drawing pressed buttons inconsistently
Murrine gtk2 engine drawing pressed buttons inconsistently
Status: RESOLVED WONTFIX
Product: murrine
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: murrine-maint
murrine-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2008-12-07 11:08 UTC by Vincent
Modified: 2018-07-11 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent 2008-12-07 11:08:12 UTC
> When using one of the Murrine themes (e.g. Murrine Brave)
 > powered by the Murrine gtk engine, a pressed button can
 > have one of two kinds of appearance depending on whether
 > the button's height/width ratio is > 1. That is to say, 
 > a portrait-oriented and a landscape-oriented button will 
 > have different looks when they're kept pressed by the mouse. 
 > The expected appearance should be consistent, regardless 
 > of the button's h/w ratio.
 >
 >A portrait-like button ("Save" in gedit) and a landscape-like
 > button ("Replace" in gedit) are shot in the attached screenshots
[1] and [2].

See https://bugs.launchpad.net/ubuntu/+source/gtk2-engines-murrine/+bug/305908

[1] http://launchpadlibrarian.net/20273354/gedit_replace.png
[2] http://launchpadlibrarian.net/20273397/gedit_save.png
Comment 1 Andrea Cimitan 2008-12-07 11:18:04 UTC
how can I draw the curved highlight when the height/width ratio is > 1?
that's the main question
Comment 2 Yao Ziyuan 2008-12-07 11:34:00 UTC
Solution #1: Don't draw curved highlight at all.

Solution #2: Always draw the highlight in the same way and orientation; stretch it rather than rotate it.

This highlight orientation inconsistency aside, Murrine + X-Colors is one of the best Linux theme available and I strongly support it as Ubuntu's default theme.
Comment 3 Yao Ziyuan 2008-12-07 11:43:07 UTC
When the height (or width) is too small, you can first draw with a larger height (or width), and then clip the actual height (or width) in the middle.
Comment 4 Andrea Cimitan 2008-12-07 12:25:55 UTC
Sol #1: you mean disabling curved highlight on small buttons?
Sol #2: quite complicated in the current code I guess... I need to take a closer look but it doesn't seem easy to me.
Sol #3: it could break some styles and be slower...
Comment 5 Yao Ziyuan 2008-12-07 12:30:03 UTC
Just study how other engines tackle this problem.

Disabling curved highlight on small buttons is a cool solution (although I originally meant to disable highlight on all buttons, large and small).
Comment 6 Andrea Cimitan 2008-12-07 12:35:50 UTC
Other engines don't have this problem because they are not drawing highlight.
Clearlooks and other gnome themes are developed by me, and I haven't encountered this problem.

Another issue is that the button is not necessarily small, open "amule" for example, and see the button on the connection page, it is big and with height/width > 1. 
Comment 7 Yao Ziyuan 2008-12-07 12:50:34 UTC
I mean, if a toolbar has both h/w>1 buttons and h/w<1 buttons, their highlight directions are different (some highlights are vertical while others are horizontal), which is not desired. Buttons on the same toolbar should have the same highlight direction (e.g. all horizontal).

If in some cases you can't draw all buttons with the same highlight direction well (e.g. if a button's width or height is too small), then don't draw the highlight in such cases.
Comment 8 Andrea Cimitan 2008-12-07 13:01:46 UTC
I understood what you mean... but that is odd!!!

it's like a non-glossy button between glossy ones...
Comment 9 Yao Ziyuan 2008-12-07 13:05:54 UTC
Then always draw the highlight (even if the button is small), and always draw it in the same direction. Then show me a screenshot of any bad case.
Comment 10 Andrea Cimitan 2008-12-07 13:55:43 UTC
due to the nature of the highlight, I can't draw that kind of highlight (curved) if height/width > 1.
Comment 11 Yao Ziyuan 2008-12-07 14:53:22 UTC
The highlight can be drawn as a half ellipse whose diameter is the top of the button rectangle, just like a D rotating 90 degrees clockwise.

Of course there are other shapes for the highlight such that you don't have to rotate such shapes.

And I also feel OK with the current one now, if no better solution can be achieved at this time.
Comment 12 André Klapper 2018-07-11 12:36:16 UTC
Murrine is not under active development anymore and had its last code changes
in 2012. Its codebase has been archived:
https://gitlab.gnome.org/Archive/murrine/commits/master

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the
responsibility for active development again.