Annother change to E5SideBar to fix the vanishing issue.

Tue, 01 Nov 2011 12:23:16 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 01 Nov 2011 12:23:16 +0100
changeset 1411
f170cd6440d2
parent 1410
299cf3b5cda0
child 1413
7b9d59fc16e8

Annother change to E5SideBar to fix the vanishing issue.

E5Gui/E5SideBar.py file | annotate | diff | comparison | revisions
--- a/E5Gui/E5SideBar.py	Tue Nov 01 11:04:54 2011 +0100
+++ b/E5Gui/E5SideBar.py	Tue Nov 01 12:23:16 2011 +0100
@@ -110,10 +110,10 @@
         self.__minimized = True
         self.__bigSize = self.size()
         if self.__orientation in [E5SideBar.North, E5SideBar.South]:
-            self.__minSize = max(self.minimumHeight(), self.__minimum)
+            self.__minSize = self.minimumSizeHint().height()
             self.__maxSize = self.maximumHeight()
         else:
-            self.__minSize = max(self.minimumWidth(), self.__minimum)
+            self.__minSize = self.minimumSizeHint().width()
             self.__maxSize = self.maximumWidth()
         if self.splitter:
             self.splitterSizes = self.splitter.sizes()
@@ -204,6 +204,10 @@
         else:
             self.__tabBar.addTab(iconOrLabel)
         self.__stackedWidget.addWidget(widget)
+        if self.__orientation in [E5SideBar.North, E5SideBar.South]:
+            self.__minSize = self.minimumSizeHint().height()
+        else:
+            self.__minSize = self.minimumSizeHint().width()
     
     def insertTab(self, index, widget, iconOrLabel, label=None):
         """
@@ -221,6 +225,10 @@
         else:
             self.__tabBar.insertTab(index, iconOrLabel)
         self.__stackedWidget.insertWidget(index, widget)
+        if self.__orientation in [E5SideBar.North, E5SideBar.South]:
+            self.__minSize = self.minimumSizeHint().height()
+        else:
+            self.__minSize = self.minimumSizeHint().width()
     
     def removeTab(self, index):
         """
@@ -230,6 +238,10 @@
         """
         self.__stackedWidget.removeWidget(self.__stackedWidget.widget(index))
         self.__tabBar.removeTab(index)
+        if self.__orientation in [E5SideBar.North, E5SideBar.South]:
+            self.__minSize = self.minimumSizeHint().height()
+        else:
+            self.__minSize = self.minimumSizeHint().width()
     
     def clear(self):
         """
@@ -460,10 +472,10 @@
                 self.splitterSizes = self.splitter.sizes()
             self.__bigSize = self.size()
             if self.__orientation in [E5SideBar.North, E5SideBar.South]:
-                self.__minSize = self.minimumHeight()
+                self.__minSize = self.minimumSizeHint().height()
                 self.__maxSize = self.maximumHeight()
             else:
-                self.__minSize = self.minimumWidth()
+                self.__minSize = self.minimumSizeHint().width()
                 self.__maxSize = self.maximumWidth()
         
         data = QByteArray()

eric ide

mercurial