Change animation if vertical position is below 50%, fixes issue #12 .

master
Jens Lody 9 years ago
parent ebc5af86e1
commit fddeb43b7c
  1. 16
      src/extension.js

@ -204,11 +204,9 @@ let extensionShowNotification = function() {
this._bannerBin._opacity = 0;
this._bannerBin.opacity = 0;
let yTop = (Main.layoutManager.bottomMonitor.y + Main.layoutManager.bottomMonitor.height);
let yBottom = this._banner.actor.height;
this._bannerBin.y = -(yTop - yBottom) * getY_position() / 100 + yBottom;
if (getY_position() < 50)
this._bannerBin.y = Main.layoutManager.bottomMonitor.y + Main.layoutManager.bottomMonitor.height;
else
this._bannerBin.y = -this._banner.actor.height;
this.actor.show();
@ -224,10 +222,10 @@ let extensionShowNotification = function() {
this._notificationWidget.opacity = 0;
// JRL changes begin
//this._notificationWidget.y = 0;
let yTop = -(Main.layoutManager.bottomMonitor.y + Main.layoutManager.bottomMonitor.height);
let yBottom = 0;
this._notificationWidget.y = (yTop - yBottom) * getY_position() / 100 + yBottom;
if (getY_position() < 50)
this._notificationWidget.y = this.actor.height;
else
this._notificationWidget.y = -(Main.layoutManager.bottomMonitor.y + Main.layoutManager.bottomMonitor.height);
// JRL changes end

Loading…
Cancel
Save