Skip to content

Commit

Permalink
cornerbar: Port to Clutter animations (#12199)
Browse files Browse the repository at this point in the history
  • Loading branch information
anaximeno committed May 17, 2024
1 parent 355e459 commit 3491b60
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const Settings = imports.ui.settings;
const PopupMenu = imports.ui.popupMenu;
const SignalManager = imports.misc.signalManager;
const Mainloop = imports.mainloop;
const Tweener = imports.ui.tweener;
const Cinnamon = imports.gi.Cinnamon;

const SCROLL_DELAY = 200;
Expand Down Expand Up @@ -142,11 +141,11 @@ class CinnamonBarApplet extends Applet.Applet {
compositor.add_effect_with_name('peek-blur', compositor.eff);
}

Tweener.addTween(compositor,
compositor.ease(
{
opacity: this.peek_opacity / 100 * 255,
time: 0.275,
transition: "easeInSine"
duration: 275,
mode: Clutter.AnimationMode.EASE_IN_SINE,
}
);
}
Expand All @@ -162,7 +161,7 @@ class CinnamonBarApplet extends Applet.Applet {

_on_leave(event) {
if (this._did_peek) {
this.show_all_windows(0.2);
this.show_all_windows(200);
this._did_peek = false;
}
if (this._peek_timeout_id > 0) {
Expand Down Expand Up @@ -214,11 +213,11 @@ class CinnamonBarApplet extends Applet.Applet {
let window = windows[i].meta_window;
let compositor = windows[i];

Tweener.addTween(compositor,
compositor.ease(
{
opacity: 255,
time: time,
transition: "easeOutSine"
mode: Clutter.AnimationMode.EASE_OUT_SINE,
duration: time,
}
);

Expand Down

0 comments on commit 3491b60

Please sign in to comment.