summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-10-17 03:13:21 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-10-17 03:13:21 (GMT)
commitba2f07df092f7786a620bf412a749a6003412430 (patch)
treeedb69a40392459c24c36dc97bf8c387f3470c433 /Lib/idlelib
parent52f2ae8d3303fdb994be981dcebd020ae58aeea1 (diff)
parent9a6f8e18662c67cd41bf54ef3b8dbf2b7f5a3aeb (diff)
downloadcpython-ba2f07df092f7786a620bf412a749a6003412430.zip
cpython-ba2f07df092f7786a620bf412a749a6003412430.tar.gz
cpython-ba2f07df092f7786a620bf412a749a6003412430.tar.bz2
Merge with 3.4 Issue #22628
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/TreeWidget.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
index f05011d..860f60c 100644
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -173,11 +173,12 @@ class TreeNode:
def draw(self, x, y):
# XXX This hard-codes too many geometry constants!
+ dy = 20
self.x, self.y = x, y
self.drawicon()
self.drawtext()
if self.state != 'expanded':
- return y+17
+ return y + dy
# draw children
if not self.children:
sublist = self.item._GetSubList()
@@ -188,7 +189,7 @@ class TreeNode:
child = self.__class__(self.canvas, self, item)
self.children.append(child)
cx = x+20
- cy = y+17
+ cy = y + dy
cylast = 0
for child in self.children:
cylast = cy
@@ -227,7 +228,7 @@ class TreeNode:
def drawtext(self):
textx = self.x+20-1
- texty = self.y-1
+ texty = self.y-4
labeltext = self.item.GetLabelText()
if labeltext:
id = self.canvas.create_text(textx, texty, anchor="nw",