aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2016-08-29 18:44:35 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2016-08-29 18:44:35 +0300
commitf7e96cf0afb47618e1785296b0cf904e6aacb9a3 (patch)
treef8bb6e32159f3c4fc076133c4d288356487c8964
parentElm.Genlist: Document new "indent" item style (diff)
downloadpython-efl-f7e96cf0afb47618e1785296b0cf904e6aacb9a3.tar.gz
Elm.Spinner: Add two missing signals and fix documentation issues
-rw-r--r--doc/elementary/spinner.rst2
-rw-r--r--efl/elementary/spinner.pxi30
2 files changed, 27 insertions, 5 deletions
diff --git a/doc/elementary/spinner.rst b/doc/elementary/spinner.rst
index 547260c..3f0d236 100644
--- a/doc/elementary/spinner.rst
+++ b/doc/elementary/spinner.rst
@@ -31,6 +31,8 @@ Emitted signals
the user. This will be called only when the user stops dragging
for a very short period or when they release their finger/mouse,
so it avoids possibly expensive reactions to the value change.
+- ``spinner,drag,start`` - When dragging has started.
+- ``spinner,drag,stop`` - When dragging has stopped.
Available styles
diff --git a/efl/elementary/spinner.pxi b/efl/elementary/spinner.pxi
index 47de51a..1c7a32e 100644
--- a/efl/elementary/spinner.pxi
+++ b/efl/elementary/spinner.pxi
@@ -299,7 +299,7 @@ cdef class Spinner(LayoutClass):
Rounding works as follows:
- ``rounded_val = base + (double)(((value - base) / round) round)``
+ ``rounded_val = base + (double)(((value - base) / round) * round)``
Where rounded_val, value and base are doubles, and round is an integer.
@@ -307,11 +307,9 @@ cdef class Spinner(LayoutClass):
of "round" starting from the value of this property. The default
base for rounding is 0.
- Example: round = 3, base = 2
- Values: 3, 6, 9, 12, 15, ...
+ Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
- Example: round = 2, base = 5.5
- Values: 5.5, 7.5, 9.5, 11.5, ...
+ Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ...
.. seealso:: :py:attr:`round`
@@ -367,5 +365,27 @@ cdef class Spinner(LayoutClass):
def callback_delay_changed_del(self, func):
self._callback_del("delay,changed", func)
+ def callback_drag_start_add(self, func, *args, **kwargs):
+ """When dragging has started.
+
+ .. versionadded:: 1.19
+
+ """
+ self._callback_add("spinner,drag,start", func, args, kwargs)
+
+ def callback_drag_start_del(self, func):
+ self._callback_del("spinner,drag,start", func)
+
+ def callback_drag_stop_add(self, func, *args, **kwargs):
+ """When dragging has stopped.
+
+ .. versionadded:: 1.19
+
+ """
+ self._callback_add("spinner,drag,stop", func, args, kwargs)
+
+ def callback_drag_stop_del(self, func):
+ self._callback_del("spinner,drag,stop", func)
+
_object_mapping_register("Elm_Spinner", Spinner)