From a3d15b5eaa8169b2d4a265b7c9aa59346fdefb63 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Sat, 27 Aug 2011 14:19:39 -0700 Subject: [PATCH] Toasts, deal with top or bottom taskbar --- toast.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toast.py b/toast.py index f84e945..8aaa101 100644 --- a/toast.py +++ b/toast.py @@ -232,7 +232,9 @@ class PesterToast(QtGui.QWidget, DefaultToast): self.msg.setText(PesterToast.wrapText(self.msg.font(), str(self.msg.text()), self.parent().theme["toasts/width"], self.parent().theme["toasts/content/style"])) - anim.setStartValue(0) + p = QtGui.QApplication.desktop().availableGeometry(self).bottomRight() + o = QtGui.QApplication.desktop().screenGeometry(self).bottomRight() + anim.setStartValue(p.y() - o.y()) anim.setEndValue(100) self.connect(anim, QtCore.SIGNAL('valueChanged(QVariant)'), self, QtCore.SLOT('updateBottomLeftAnimation(QVariant)'))