GNOME Bugzilla – Bug 703109
Sub-menu triangles pivot from one corner
Last modified: 2013-08-15 17:23:40 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.
(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.
Created attachment 247915 [details] [review] popupMenu: changes rotation center of sub-menu triangle Changed rotation center to Clutter.Gravity.WEST
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);
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.
Review of attachment 248447 [details] [review]: Sorry for taking so long to get around to this; looks good. Do you have commit rights?
Attachment 248447 [details] pushed as 386f88c - popupMenu: changes rotation center of sub-menu's triangle
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?
(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.