changeset 610:3087215c9ca1

Added the marker_length property to the slider widget. This allows you to set the length of the value marker in the slider.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 21 Sep 2010 19:00:51 +0000
parents bab6eeec278c
children 678fd71c0753
files engine/python/fife/extensions/pychan/widgets/slider.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)