@@ -23,10 +23,10 @@ let MAX_THUMBNAIL_SCALE = 0.9;
2323const POINTER_LEAVE_MILLISECONDS_GRACE = 500 ;
2424const POINTER_ENTER_MILLISECONDS_GRACE = 150 ;
2525const RESCALE_ANIMATION_TIME = 0.2 ;
26- const SLIDE_ANIMATION_TIME = 0.3 ;
26+ const SLIDE_ANIMATION_TIME = 300 ;
2727const INACTIVE_OPACITY = 120 ;
28- const REARRANGE_TIME_ON = 0.1 ;
29- const REARRANGE_TIME_OFF = 0.3 ;
28+ const REARRANGE_TIME_ON = 100 ;
29+ const REARRANGE_TIME_OFF = 300 ;
3030const ICON_OPACITY = Math . round ( 255 * 0.9 ) ;
3131const ICON_SIZE = 128 ;
3232const ICON_OFFSET = - 5 ;
@@ -364,8 +364,10 @@ ExpoWorkspaceThumbnail.prototype = {
364364 can_focus : true } ) ;
365365 this . title . _spacing = 0 ;
366366 this . titleText = this . title . clutter_text ;
367+ this . titleText . editable = false ;
367368 this . titleText . connect ( 'key-press-event' , Lang . bind ( this , this . onTitleKeyPressEvent ) ) ;
368369 this . titleText . connect ( 'key-focus-in' , Lang . bind ( this , function ( ) {
370+ this . titleText . editable = true ;
369371 this . origTitle = Main . getWorkspaceName ( this . metaWorkspace . index ( ) ) ;
370372 } ) ) ;
371373 this . titleText . connect ( 'key-focus-out' , Lang . bind ( this , function ( ) {
@@ -774,7 +776,13 @@ ExpoWorkspaceThumbnail.prototype = {
774776 windows . push ( window ) ;
775777 }
776778 else {
777- Tweener . addTween ( window . actor , { scale_x : 0 , scale_y : 0 , time : REARRANGE_TIME_ON , transition : 'easeOutQuad' , onComplete : window . actor . hide } ) ;
779+ window . actor . ease ( {
780+ scale_x : 0 ,
781+ scale_y : 0 ,
782+ duration : REARRANGE_TIME_ON ,
783+ mode : Clutter . AnimationMode . EASE_OUT_QUAD ,
784+ onComplete : ( ) => window . actor . hide ( )
785+ } ) ;
778786 }
779787 } , this ) ;
780788
@@ -812,14 +820,18 @@ ExpoWorkspaceThumbnail.prototype = {
812820 window . icon . set_scale ( iconScale , iconScale ) ;
813821 let [ iconX , iconY ] = [ ICON_OFFSET / this . box . scale / scale , ICON_OFFSET / this . box . scale / scale ] ;
814822 window . icon . set_position ( iconX , iconY ) ;
815- Tweener . addTween ( window . actor , {
816- x : x , y : y , scale_x : scale , scale_y : scale ,
823+ window . actor . ease ( {
824+ x : x ,
825+ y : y ,
826+ scale_x : scale ,
827+ scale_y : scale ,
817828 opacity : 255 ,
818- time : REARRANGE_TIME_ON , transition : 'easeOutQuad' ,
819- onComplete : function ( ) {
829+ duration : REARRANGE_TIME_ON ,
830+ mode : Clutter . AnimationMode . EASE_OUT_QUAD ,
831+ onComplete : ( ) => {
820832 window . actor . show ( ) ;
821833 window . icon . show ( ) ;
822- }
834+ }
823835 } ) ;
824836 col ++ ;
825837 if ( col > nCols ) {
@@ -851,12 +863,13 @@ ExpoWorkspaceThumbnail.prototype = {
851863 window . showUrgencyState ( ) ;
852864 window . icon . hide ( ) ;
853865 window . actor . show ( ) ;
854- Tweener . addTween ( window . actor , {
866+ window . actor . ease ( {
855867 x : window . origX ,
856868 y : window . origY ,
857869 scale_x : 1 , scale_y : 1 ,
858870 opacity : window . metaWindow . showing_on_its_workspace ( ) ? 255 : 127 ,
859- time : rearrangeTime , transition : 'easeOutQuad'
871+ duration : rearrangeTime ,
872+ mode : Clutter . AnimationMode . EASE_OUT_QUAD
860873 } ) ;
861874 } , this ) ;
862875 } , this ) ;
@@ -889,12 +902,21 @@ ExpoWorkspaceThumbnail.prototype = {
889902 } ,
890903
891904 shade : function ( force ) {
892- if ( ! this . isSelected || force )
893- Tweener . addTween ( this . shader , { opacity : INACTIVE_OPACITY , time : SLIDE_ANIMATION_TIME , transition : 'easeOutQuad' } ) ;
905+ if ( ! this . isSelected || force ) {
906+ this . shader . ease ( {
907+ opacity : INACTIVE_OPACITY ,
908+ duration : SLIDE_ANIMATION_TIME ,
909+ mode : Clutter . AnimationMode . EASE_OUT_QUAD
910+ } ) ;
911+ }
894912 } ,
895913
896914 highlight : function ( ) {
897- Tweener . addTween ( this . shader , { opacity : 0 , time : SLIDE_ANIMATION_TIME , transition : 'easeOutQuad' } ) ;
915+ this . shader . ease ( {
916+ opacity : 0 ,
917+ duration : SLIDE_ANIMATION_TIME ,
918+ mode : Clutter . AnimationMode . EASE_OUT_QUAD
919+ } ) ;
898920 } ,
899921
900922 remove : function ( ) {
@@ -1028,7 +1050,6 @@ ExpoThumbnailsBox.prototype = {
10281050 request_mode : Clutter . RequestMode . WIDTH_FOR_HEIGHT } ) ;
10291051 this . actor . connect ( 'get-preferred-width' , Lang . bind ( this , this . getPreferredWidth ) ) ;
10301052 this . actor . connect ( 'get-preferred-height' , Lang . bind ( this , this . getPreferredHeight ) ) ;
1031- this . actor . connect ( 'allocate' , Lang . bind ( this , this . allocate ) ) ;
10321053
10331054 // When we animate the scale, we don't animate the requested size of the thumbnails, rather
10341055 // we ask for our final size and then animate within that size. This slightly simplifies the
@@ -1142,6 +1163,8 @@ ExpoThumbnailsBox.prototype = {
11421163 this . stateCounts [ ThumbnailState [ key ] ] = 0 ;
11431164
11441165 this . addThumbnails ( 0 , global . workspace_manager . n_workspaces ) ;
1166+ this . actor . connect ( 'allocate' , Lang . bind ( this , this . allocate ) ) ;
1167+
11451168 this . button . raise_top ( ) ;
11461169
11471170 global . stage . set_key_focus ( this . actor ) ;
@@ -1389,7 +1412,7 @@ ExpoThumbnailsBox.prototype = {
13891412
13901413 Tweener . addTween ( thumbnail ,
13911414 { slidePosition : 1 ,
1392- time : SLIDE_ANIMATION_TIME ,
1415+ time : SLIDE_ANIMATION_TIME / 1000 ,
13931416 transition : 'linear' ,
13941417 onComplete : function ( ) {
13951418 this . setThumbnailState ( thumbnail , ThumbnailState . ANIMATED_OUT ) ;
@@ -1448,7 +1471,7 @@ ExpoThumbnailsBox.prototype = {
14481471 this . setThumbnailState ( thumbnail , ThumbnailState . ANIMATING_IN ) ;
14491472 Tweener . addTween ( thumbnail ,
14501473 { slidePosition : 0 ,
1451- time : SLIDE_ANIMATION_TIME ,
1474+ time : SLIDE_ANIMATION_TIME / 1000 ,
14521475 transition : 'easeOutQuad' ,
14531476 onComplete : function ( ) {
14541477 this . setThumbnailState ( thumbnail , ThumbnailState . NORMAL ) ;
@@ -1698,9 +1721,7 @@ ExpoThumbnailsBox.prototype = {
16981721
16991722 this . button . allocate ( childBox , flags ) ;
17001723
1701- if ( this . targetScale === this . _scale ) {
1702- this . emit ( 'allocated' ) ;
1703- }
1724+ this . emit ( 'allocated' ) ;
17041725 } ,
17051726
17061727 activeWorkspaceChanged : function ( wm , from , to , direction ) {
0 commit comments