| Issue 227: | Allow two-way scrolling on a kinetic list if do_x and do_y are both true | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. If do_x and do_y are both true for MTKineticList then only do_y will be
respected because of the use of "elif" instead of "if"
What is the expected output? What do you see instead?
It should be possible to scroll kinetic lists in the x and y axes
simultaneously if do_x and do_y are both true.
What version of the product are you using? On what operating system?
Linux (Fedora 11) Git HEAD
Please provide any additional information below.
diff --git a/pymt/ui/widgets/composed/kineticlist.py
b/pymt/ui/widgets/composed/kineticlist.py
index 4167392..1ca1e1d 100644
--- a/pymt/ui/widgets/composed/kineticlist.py
+++ b/pymt/ui/widgets/composed/kineticlist.py
@@ -444,7 +444,7 @@ class MTKineticList(MTStencilContainer):
self.yoffset = boundary(self.yoffset, -size + self.height, 0)
self._scrollbar_size = self.height / size
self._scrollbar_index = -self.yoffset / size
- elif self.do_x:
+ if self.do_x:
if size < self.width:
self.xoffset = 0
else:
@@ -512,7 +512,7 @@ class MTKineticList(MTStencilContainer):
size = [sb_size, self.height - mbottom - mtop]
pos[1] += size[1] * self._scrollbar_index
size[1] = size[1] * self._scrollbar_size
- elif self.do_x:
+ if self.do_x:
pos = [self.x + mleft, self.y + self.height - mtop - sb_size]
size = [self.width - mleft - mright, sb_size]
pos[0] += size[0] * self._scrollbar_index
May 25, 2010
This patch alone is not sufficient, since scrollbar is not duplicated for both axes.
Status:
Started
Jun 1, 2010
(No comment was entered for this change.)
Labels:
Milestone-0.5
Jun 21, 2010
KineticList will be deprecated in the next version. The new MTList widget is now able to do this.
Status:
Done
|
Owner: txprog
Labels: Component-Core Milestone-0.4.1