Author terry.reedy
Recipients Saimadhav.Heblikar, terry.reedy
Date 2014-10-14.03:09:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413256178.66.0.725794954703.issue22628@psf.upfronthosting.co.za>
In-reply-to
Content
(Mentioned on #16233) At least on my windows 7 system, the lines of idlelib.TreeWidget, used for Path Browser and Class (Module) Browser, are spaced too narrowly.  They are so close together that they overlap and each cuts off enough of the line above to make reading difficult.

TreeWidget is actually a canvas painted with icons, connecting lines, and lines of text. There is no automatic spacing of text lines as with tkinter.Text.  A comment in the draw method notes "XXX This hard-codes too many geometry constants!".

The attached patch changes two of the constants.  Increasing dy spreads the line apart a bit so there is very little clipping. (Both g and y are sometimes complete, sometimes not.) The other change moves the lines up relative to the icons so they are not offset.

Saimadhav, does this change look ok on linux?

I think the long term fix (before 3.5) is to use ttk.Treeview.  So I am not inclined to spend lots of time fine-tuning on various systems or adding user configuration (though we might for Treeview).  However, dy could be made conditional on, for instance, sys.platform[0:3] == 'win'.
History
Date User Action Args
2014-10-14 03:09:38terry.reedysetrecipients: + terry.reedy, Saimadhav.Heblikar
2014-10-14 03:09:38terry.reedysetmessageid: <1413256178.66.0.725794954703.issue22628@psf.upfronthosting.co.za>
2014-10-14 03:09:38terry.reedylinkissue22628 messages
2014-10-14 03:09:37terry.reedycreate