UI/NotificationWidget.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3383
2da1760fe787
child 3656
441956d8fce5
diff -r 96232974dcdb -r 645c12de6b0c UI/NotificationWidget.py
--- a/UI/NotificationWidget.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/UI/NotificationWidget.py	Thu Apr 03 23:05:31 2014 +0200
@@ -48,6 +48,9 @@
             flags |= Qt.ToolTip
         self.setWindowFlags(flags)
         
+        self.frame.layout().setAlignment(
+            self.verticalLayout, Qt.AlignLeft | Qt.AlignVCenter)
+        
         self.__timer = QTimer(self)
         self.__timer.setSingleShot(True)
         self.__timer.timeout.connect(self.close)
@@ -101,6 +104,9 @@
             self.__timer.start()
         
         super(NotificationWidget, self).show()
+        
+        sh = self.sizeHint()
+        self.resize(max(self.width(), sh.width()), sh.height())
     
     def mousePressEvent(self, evt):
         """

eric ide

mercurial