A change to hopefully fix the sidebar vanishing issue. 5_1_x

Mon, 24 Oct 2011 19:12:23 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 24 Oct 2011 19:12:23 +0200
branch
5_1_x
changeset 1397
acc61b0fb135
parent 1395
1eb21f914629
child 1398
187a2f37e1d4

A change to hopefully fix the sidebar vanishing issue.
(transplanted from f5d4c309fe8a41726509cdf4df8ae3d5401b6e2f)

E5Gui/E5SideBar.py file | annotate | diff | comparison | revisions
--- a/E5Gui/E5SideBar.py	Sun Oct 23 18:31:31 2011 +0200
+++ b/E5Gui/E5SideBar.py	Mon Oct 24 19:12:23 2011 +0200
@@ -58,6 +58,7 @@
         self.setLayout(self.layout)
         
         self.__minimized = False
+        self.__minimum = 50
         self.__minSize = 0
         self.__maxSize = 0
         self.__bigSize = QSize()
@@ -108,10 +109,10 @@
         self.__minimized = True
         self.__bigSize = self.size()
         if self.__orientation in [E5SideBar.North, E5SideBar.South]:
-            self.__minSize = self.minimumHeight()
+            self.__minSize = max(self.minimumHeight(), self.__minimum)
             self.__maxSize = self.maximumHeight()
         else:
-            self.__minSize = self.minimumWidth()
+            self.__minSize = max(self.minimumWidth(), self.__minimum)
             self.__maxSize = self.maximumWidth()
         if self.splitter:
             self.splitterSizes = self.splitter.sizes()
@@ -131,10 +132,10 @@
         self.__stackedWidget.show()
         self.resize(self.__bigSize)
         if self.__orientation in [E5SideBar.North, E5SideBar.South]:
-            self.setMinimumHeight(self.__minSize)
+            self.setMinimumHeight(max(self.__minSize, self.__minimum))
             self.setMaximumHeight(self.__maxSize)
         else:
-            self.setMinimumWidth(self.__minSize)
+            self.setMinimumWidth(max(self.__minSize, self.__minimum))
             self.setMaximumWidth(self.__maxSize)
         if self.splitter:
             self.splitter.setSizes(self.splitterSizes)

eric ide

mercurial