dabo Commit
Revision 6890
Date: 2011-10-11 12:38:05 -0700 (Tue, 11 Oct 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6890
Changed:
U trunk/dabo/ui/uiwx/dSpinner.py
Log:
On Windows, the spinner buttons of dSpinner were way too wide. Fixed. Also,
removed the alignment parameters which are unneeded.
Diff:
Modified: trunk/dabo/ui/uiwx/dSpinner.py
===================================================================
--- trunk/dabo/ui/uiwx/dSpinner.py 2011-10-11 13:14:01 UTC (rev 6889)
+++ trunk/dabo/ui/uiwx/dSpinner.py 2011-10-11 19:38:05 UTC (rev 6890)
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import sys
import locale
from decimal import Decimal as decimal
import operator
@@ -25,8 +26,10 @@
kwargs["style"] = kwargs.get("style", 0) | wx.SP_ARROW_KEYS
dcm.dDataControlMixin.__init__(self, preClass, parent,
properties=properties,
attProperties=attProperties, *args, **kwargs)
+ if sys.platform.startswith("win"):
+ # otherwise, the arrows are way too wide (34)
+ self.Width = 17
-
class dSpinner(dabo.ui.dDataPanel, wx.Control):
"""
Control for allowing a user to increment a value by discreet steps
across a range
@@ -52,9 +55,8 @@
self._proxy_spinner = _dSpinButton(parent=self,
_EventTarget=self)
self.__constructed = True
self.Sizer = dabo.ui.dSizer("h")
- self.Sizer.append1x(self._proxy_textbox, valign="middle")
- #self.Sizer.appendSpacer((2,0)) ## pkm: I think it looks
better without...
- self.Sizer.append(self._proxy_spinner, "expand",
valign="middle")
+ self.Sizer.append1x(self._proxy_textbox)
+ self.Sizer.append(self._proxy_spinner, "expand")
self.layout()
self.Bind(wx.EVT_WINDOW_DESTROY, self.__onWxDestroy)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]