# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1285095651 0 # Node ID 3087215c9ca1d0b2bdf23d0f3e38c3a23692a173 # Parent bab6eeec278c859e5f8aa0165949f787dba7d775 Added the marker_length property to the slider widget. This allows you to set the length of the value marker in the slider. diff -r bab6eeec278c -r 3087215c9ca1 engine/python/fife/extensions/pychan/widgets/slider.py --- a/engine/python/fife/extensions/pychan/widgets/slider.py Tue Sep 21 18:13:21 2010 +0000 +++ b/engine/python/fife/extensions/pychan/widgets/slider.py Tue Sep 21 19:00:51 2010 +0000 @@ -37,7 +37,7 @@ - scale_start: float: default 0.0 - scale_end: float: default 1.0 - step_length: float: default scale_end/10 - + - marker_length: int: default 10 FIXME: - update docstrings """ @@ -45,7 +45,7 @@ HORIZONTAL = fife.Slider.HORIZONTAL VERTICAL = fife.Slider.VERTICAL - ATTRIBUTES = Widget.ATTRIBUTES + [IntAttr('orientation'), FloatAttr('scale_start'), FloatAttr('scale_end'), FloatAttr('step_length')] + ATTRIBUTES = Widget.ATTRIBUTES + [IntAttr('orientation'), FloatAttr('scale_start'), FloatAttr('scale_end'), FloatAttr('step_length'), IntAttr('marker_length')] DEFAULT_HEXPAND = 1 DEFAULT_VEXPAND = 0 @@ -108,6 +108,7 @@ def getMarkerLength(self): """getMarkerLength(self) -> int""" return self.real_widget.getMarkerLength() + marker_length = property(getMarkerLength, setMarkerLength) def setOrientation(self, orientation): """setOrientation(self, Orientation orientation)""" @@ -127,5 +128,4 @@ def getStepLength(self): """getStepLength(self) -> double""" return self.real_widget.getStepLength() - step_length = property(getStepLength, setStepLength)