Update TreeView (old uncommitted work). api0
authorRadek Brich <radek.brich@devl.cz>
Wed, 20 Aug 2014 15:06:52 +0200
changeset 102 29a8a26a721f
parent 99 f3063f08ba81
Update TreeView (old uncommitted work).
tuikit/treeview.py
tuikit/window.py
--- a/tuikit/treeview.py	Wed Aug 20 14:24:48 2014 +0200
+++ b/tuikit/treeview.py	Wed Aug 20 15:06:52 2014 +0200
@@ -349,12 +349,11 @@
         height = 0
         for num, _ in enumerate(self, start=1):
             height = num
-        self.sizereq.h = height
+        self.sizereq.update(h = height)
 
     def _update_spot(self):
         """Update spot to current position of cursor node."""
         for num, (_level, _index, _count, node) in enumerate(self):
             if node is self.cursor_node:
-                self._spot.x = _level * 2
-                self._spot.y = num
+                self._spot.update(_level * 2, num)
 
--- a/tuikit/window.py	Wed Aug 20 14:24:48 2014 +0200
+++ b/tuikit/window.py	Wed Aug 20 15:06:52 2014 +0200
@@ -9,10 +9,12 @@
 
 class Window(AnchorLayout):
 
-    '''Window widget.
+    """Window widget.
 
-    It represents part of screen with border, close button and contents.
-    Window can be moved, resized or closed by user.'''
+    Represents part of screen with border, close button and contents.
+    Window can be moved, resized or closed by user.
+
+    """
 
     def __init__(self, inner_layout=AnchorLayout):
         '''Create window of requested size.'''