gnome shell扩展动画演员大小

时间:2016-01-06 20:14:17

标签: clutter gnome-shell gnome-shell-extensions gjs

我正在尝试为gnome-shell中的现有actor设置动画。我尝试了几种方法,每次我都能改变演员的位置,但我无法改变演员的大小。

这是我尝试的方式之一,演员正在改变它的位置,但不会改变大小。

Tweener.addTween(boxa,
{  x1: targetX,
    y1: targetY,
   x2: targetX+targetWidth,
   y2: targetY+targetHeight,
   time: 2,
   transition: "easeOutElastic",
   onUpdate: function (_actor) { _actor.set_position(this.x1, this.y1); 
                                 _actor.set_width(this.x2 - this.x1); 
                                 _actor.set_height(this.y2 - this.y1); 
                                 log("TWEENER x1:" + this.x1 + " x2:"+ this.x2 + " y1:"+ this.y1 + " y2:"+ this.y2)},
   onUpdateParams: [actor],
   onComplete: function (_actor) {shellwm.completed_maximize(_actor)},
   onCompleteParams: [actor]
});

我也尝试过直接使用set_width和set_hight而没有成功,并且没有错误。

0 个答案:

没有答案