Author: reinhard
Date: 2007-04-09 15:49:15 -0500 (Mon, 09 Apr 2007)
New Revision: 9469
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Do not set a minimum size different than the default size, because wx uses the
minimum size to distribute the available size.
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2007-04-09 20:45:46 UTC (rev 9468)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2007-04-09 20:49:15 UTC (rev 9469)
@@ -560,6 +560,10 @@
Return a wx.Size with the minimum size of a widget
"""
+ # This is currently not used, because wx distributes the available
+ # space based on the minimum size of the widgets instead of the "best"
+ # or default size of the widgets. So we have to set the minimum size to
+ # the same values as the default size.
cellw = self._uiDriver.cellWidth
cellh = self._uiDriver.cellHeight
@@ -598,7 +602,7 @@
if self.def_width:
defw = self.def_width * cellw
else:
- maxw = min(self.max_width or 64, 64)
+ maxw = min(self.max_width or 32, 32)
defw = min(deffield, maxw) * cellw
if not self.def_height:
@@ -639,7 +643,7 @@
else:
maxh = ((self.max_height or 0) * cellh) or bh
- minw, minh = self.get_minimum_size().Get()
+ minw, minh = self.get_default_size().Get()
if maxw != -1:
maxw = max(maxw, minw)
if maxh != -1:
@@ -653,7 +657,7 @@
def update_size_hints(self):
if self.managed:
- minw, minh = self.get_minimum_size().Get()
+ minw, minh = self.get_default_size().Get()
maxw, maxh = self.get_maximum_size().Get()
for item in self.widgets:
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.