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 703109 - Sub-menu triangles pivot from one corner
Sub-menu triangles pivot from one corner
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-06-26 10:03 UTC by Allan Day
Modified: 2013-08-15 17:23 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
popupMenu: changes rotation center of sub-menu triangle (1.17 KB, patch)
2013-06-27 14:59 UTC, Tarun Joshi
reviewed Details | Review
popupMenu: changes rotation center of sub-menu's triangle (1.37 KB, patch)
2013-07-05 10:18 UTC, Tarun Joshi
committed Details | Review

Description Allan Day 2013-06-26 10:03:16 UTC
If you expand a sub-menu, the triangle rotates 90 degrees to point down rather than to the side. However, when it rotates it pivots from one corner. This looks really odd - like the triangle is hanging on one corner, rather than being fixed in place.

The triangles should rotate around their centre point.
Comment 1 Tarun Joshi 2013-06-27 14:58:09 UTC
(In reply to comment #0)
> The triangles should rotate around their centre point.

They are actually rotating around their center point. Their rotation center is set to Clutter.gravity.CENTER but yeah they look really odd. Changing it to WEST instead of CENTER makes it look better imo.
Comment 2 Tarun Joshi 2013-06-27 14:59:34 UTC
Created attachment 247915 [details] [review]
popupMenu: changes rotation center of sub-menu triangle

Changed rotation center to Clutter.Gravity.WEST
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-07-04 14:58:28 UTC
Review of attachment 247915 [details] [review]:

::: js/ui/popupMenu.js
@@ +1140,2 @@
         this._arrow = sourceArrow;
+        this._arrow.rotation_center_z_gravity = Clutter.Gravity.WEST;

We should probably take this opportunity to use the pivot point instead of gravity. This should be as simple as this._arrow.pivot_point = new Clutter.Point(0.0, 0.5);
Comment 4 Tarun Joshi 2013-07-05 10:18:23 UTC
Created attachment 248447 [details] [review]
popupMenu: changes rotation center of sub-menu's triangle

Changed it from gravity to pivot_point.

Also the pivot_point is set to [0.3, 0.5] as it looks better that way.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-08-15 00:33:25 UTC
Review of attachment 248447 [details] [review]:

Sorry for taking so long to get around to this; looks good. Do you have commit rights?
Comment 6 drago01 2013-08-15 12:21:52 UTC
Attachment 248447 [details] pushed as 386f88c - popupMenu: changes rotation center of sub-menu's triangle
Comment 7 Tarun Joshi 2013-08-15 17:18:42 UTC
Yay! my first contribution to gnome. Looking forward to a lot more :).

(In reply to comment #5)
> Do you have commit rights?

Nope. How do I get those?
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-08-15 17:23:40 UTC
(In reply to comment #7)
> Nope. How do I get those?

Once you have a few contributions, we'll poke you to apply for an account at https://wiki.gnome.org/NewAccounts.