[gnome-shell] popupMenu: changes rotation center of sub-menu's triangle



commit 386f88c9b249c66931477e9a7add3c8d40535468
Author: Tarun Kumar Joshi <tj joshi7 gmail com>
Date:   Fri Jul 5 14:46:24 2013 +0530

    popupMenu: changes rotation center of sub-menu's triangle
    
    When the triangle rotates (when sub-menu is expanded), it seems as if
    the triangle pivots from one corner even though rotation center is set
    to Clutter.Gravity.CENTER. Hence the rotation center is set nearer to
    the edge than to the corner ([0.3, 0.5] instead of [0.5, 0.5]) so that
    it doesn't appear odd.
    
    Also pivot_point is used instead of rotation_center_z_gravity as it is
    deprecated.
    
    http://bugzilla.gnome.org/show_bug.cgi?id=703109

 js/ui/popupMenu.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 995ed13..e99bee2 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -870,7 +870,8 @@ const PopupSubMenu = new Lang.Class({
         this.parent(sourceActor);
 
         this._arrow = sourceArrow;
-        this._arrow.rotation_center_z_gravity = Clutter.Gravity.CENTER;
+        this._arrow.pivot_point = new Clutter.Point({ x: 0.3,
+                                                      y: 0.5 });
 
         // Since a function of a submenu might be to provide a "More.." expander
         // with long content, we make it scrollable - the scrollbar will only take


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]