GNOME Bugzilla – Bug 563552
Murrine gtk2 engine drawing pressed buttons inconsistently
Last modified: 2018-07-11 12:36:16 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
how can I draw the curved highlight when the height/width ratio is > 1? that's the main question
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.
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.
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...
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).
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.
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.
I understood what you mean... but that is odd!!! it's like a non-glossy button between glossy ones...
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.
due to the nature of the highlight, I can't draw that kind of highlight (curved) if height/width > 1.
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.
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.