Skip to content

Commit

Permalink
show-desktop: Port to Clutter animations (#12200)
Browse files Browse the repository at this point in the history
  • Loading branch information
anaximeno committed May 17, 2024
1 parent 3491b60 commit bf426e6
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const Applet = imports.ui.applet;
const { AppletSettings } = imports.ui.settings; // Needed for settings API
const Mainloop = imports.mainloop;
const Tweener = imports.ui.tweener;
const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu;
const St = imports.gi.St;
Expand Down Expand Up @@ -56,11 +55,11 @@ class CinnamonShowDesktopApplet extends Applet.IconApplet {
let window = windows[i].meta_window;
let compositor = windows[i];

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

Expand Down Expand Up @@ -96,11 +95,11 @@ class CinnamonShowDesktopApplet extends Applet.IconApplet {
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,
transition: Clutter.AnimationMode.EASE_IN_SINE,
}
);
}
Expand All @@ -116,7 +115,7 @@ class CinnamonShowDesktopApplet extends Applet.IconApplet {

_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

0 comments on commit bf426e6

Please sign in to comment.