[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset f6ab188323444fe0dd916ed3860cc5c8806caa16 by Miss Islington (bot) 
in branch '3.8':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/f6ab188323444fe0dd916ed3860cc5c8806caa16


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9e7697b3c55e0bd8663cf0641d4718e853af2d9c by Miss Islington (bot) 
in branch '3.7':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/9e7697b3c55e0bd8663cf0641d4718e853af2d9c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14743
pull_request: https://github.com/python/cpython/pull/14974

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14742
pull_request: https://github.com/python/cpython/pull/14973

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1 by Terry Jan Reedy (Tal 
Einat) in branch 'master':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

> The current right margin is 1 pixel. Let's try making it 2.

See PR GH-14959.  I added 2 pixels of horizontal padding to the line numbers 
text widget, and it certainly does look much nicer.  Thanks for the suggestion, 
Kyle!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +14727
pull_request: https://github.com/python/cpython/pull/14959

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The current right margin is 1 pixel. Let's try making it 2.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

Correction: Terry commented on that issue (#37628) earlier today; Raymond 
Hettinger originally reported it a about a week ago.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

Thanks for trying this and giving such useful feedback, Kyle!

Interestingly, Terry just opened an issue about exactly what you mention 
regarding the font configuration window; see issue #37628.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

After testing it on Linux (through the latest dev version, launched with 
`./.python -m idlelib`), the line numbers seem to be working quite well across 
several different fonts and font sizes. My only suggestion for minor visual 
improvement would be to increase the margin between the right side of the 
number and the line. 

While moving through a number of different fonts and sizes, I noticed a 
separate issue involving the window scaling based on the size of the font 
previews. This isn't an issue for smaller fonts, but when attempting to use 
larger fonts (upper 20s or into the 30s depending on the font in question) the 
4 buttons ("Ok", "Apply", "Cancel", and "Help") in the settings menu (options > 
configure IDLE) are moved past the lower end of the screen, making them no 
longer visible to the user.

Either way, this change is pretty awesome. The only thing preventing me from 
using the IDLE more was the lack of line numbers, so I'll definitely be using 
it a lot more now. Thanks for the PR taleinat!

--
nosy: +aeros167

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

After-thought test 2: proportional fonts* work fine.  Nearly all have 
monospaced digits, with extra space around '1' if there is no bottom bar.  So 
those also have nicely aligned right-justified columns in the sidebar.  And the 
one font I found with proportional digits, Miriam Libre, still had readable 
numbers.

* Given the PEP 8 discouragement of the sort of vertical alignment, such as

one  =  1
eight=  8
ten  = 10
nineteen = 19

which people, including me, have done with other languages, using a 
proportional font with python is not nearly as crazy as some people claim, and 
not to be totally disregarded.  The main issue is line length and what happens 
when someone else views the same file with a fixed-pitch font.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A note on the first 3 comments in msg223086 of 2014-07-15.

1. Canvas versus Text: The prototype posted by Brian Oakley on SO had to use a 
Canvas because it was meant to work even with texts with multiple fonts and 
in-line widgets.  IDLE's editor, intended mainly for .py files, does not allow 
either.  As long as line numbers use the same font as the text, they have the 
same height and vertical spacing as the text.

I checked that this remains true when non-latin character sets are mixed in.  I 
pasted the config font sample into a numbered editor and it worked perfectly. 
At least on Windows, tk fonts are vertically monospaced at least for this 
sample, and I assume for all.  To do this, either ascii/latin/etc lines are 
over-spaced or hanji/kanji/hangul lines are underspaced.  Source Code Pro, 
which I normally use, does the former.  Courier does the latter.

2. Call versus Event notification.  IDLE's menu and hot keys generate 
pseudoevents handled by one event handler.  Some tk widgets generate 
widget-specific pseudoevent that can be handled by any handler.  IDLE's config 
dialog pushes font change notifications by calling text methods that amount to 
event handlers.  It can do this because 'listed windows' are registered as 
listeners by being on the list of such instances.

I suggested 5 years ago that we might switch font change notification to 
events.  I don't think so now.  The current system allows control of the order 
in which texts within a code frame respond to config changes.  It works better 
if code contexts, when present, change before the main text.

3. Line number foreground and background.  We made them configurable to user 
preference.  Possibilities are: same as text; toned down version of text (for 
instance, black on white to dark gray on light gray), or contrasting with text.

(I discussed 4. global versus local setting on 7/21.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread Tal Einat


Tal Einat  added the comment:

PR Merged! This will be in 3.8.0 and 3.7.5. Thanks to everyone who worked on 
this and took part in the discussion!

Special thanks to Saimadhav for preparing a patch and iterating on it several 
times; I picked up the work from where he left off, and it was a great starting 
point.

Special thanks also to Terry for stewarding the development of IDLE in general, 
and for working with me actively on the PR for this over the past month and a 
half.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread Tal Einat


Tal Einat  added the comment:


New changeset e9ec1663d8fa0b3829add14e784107482af8dacb by Tal Einat in branch 
'3.7':
[3.7] bpo-17535: IDLE editor line numbers (GH-14030)
https://github.com/python/cpython/commit/e9ec1663d8fa0b3829add14e784107482af8dacb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +14692
pull_request: https://github.com/python/cpython/pull/14917

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread miss-islington


miss-islington  added the comment:


New changeset 1da6a313ddaa269dddce303cb03ca95fe57d0c85 by Miss Islington (bot) 
in branch '3.8':
bpo-17535: IDLE editor line numbers (GH-14030)
https://github.com/python/cpython/commit/1da6a313ddaa269dddce303cb03ca95fe57d0c85


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread Tal Einat


Tal Einat  added the comment:


New changeset 7123ea009b0b004062d91f69859bddf422c34ab4 by Tal Einat in branch 
'master':
bpo-17535: IDLE editor line numbers (GH-14030)
https://github.com/python/cpython/commit/7123ea009b0b004062d91f69859bddf422c34ab4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14691
pull_request: https://github.com/python/cpython/pull/14916

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ned, about window menus and Mac's single menu: tk and macOS work together to 
switch the menu to the menu of a window that becomes active.  I opened two 
editor windows and clicked 'Show Code Context' in just one of them.  The menu 
then said 'Hide Code Context'.  I clicked the other window and then Option and 
it said 'Show...'.  More experiments clicking windows and toggling CC went 
well.  Show/Hide Line Numbers is intended to work the same way.  Since Tal 
cannot now test, verification would be nice, as well as the line-up check 
described above

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Tal's 2 issues above have been resolved.
1. Line numbers are initially off by default but this can be reversed on the 
Settings General tab.
2. Line numbers can be shown and hidden for a window on the Option menu.

The only bug I know of that must be fixed before merging is that font changes 
do not always get propagated to the numbers.

I recently added 1 pixel of padding to line up line numbers and text.  How is 
is on other machines?  Especially Mac, if anyone has one?  (Tal's just broke.) 
Easy test: open a new file; type multiple 2s and 7s on lines 2 and 7.  Eyeball, 
then, use paper to see if low and high horizontal lines on 2s and 7s are lined 
up properly.

--
title: IDLE: Add an option to show line numbers along the left side of the 
editor window, and have it enabled by default. -> IDLE editor line numbers

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com