[Python-checkins] cpython (merge 3.4 -> default): Merge with 3.4 Issue #22628

terry.reedy python-checkins at python.org
Fri Oct 17 05:13:47 CEST 2014


https://hg.python.org/cpython/rev/7ee79c3d4f5f
changeset:   93096:7ee79c3d4f5f
parent:      93093:0ab23958c2a7
parent:      93095:ffe4f3694c0f
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Thu Oct 16 23:13:21 2014 -0400
summary:
  Merge with 3.4 Issue #22628

files:
  Lib/idlelib/TreeWidget.py |  7 ++++---
  1 files changed, 4 insertions(+), 3 deletions(-)


diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py
--- a/Lib/idlelib/TreeWidget.py
+++ b/Lib/idlelib/TreeWidget.py
@@ -173,11 +173,12 @@
 
     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 @@
                 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 @@
 
     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",

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list