Ned Deily added the comment:

Several review comments on tdemo-font-34-t2.diff:

- Terry's question:
>Ned, with this binding, (ignored on Mac?)
>        widget.bind_all('<Control-MouseWheel>', self._updateFont)
>plain wheel moves scroll as desired while Control-wheel changes font sizes. 
>>This is standard behavior on Windows.

That seems to work on OS X as well (with both the Cocoa and Carbon Tks), 
although IMO having a control-mousescroll affect the font size is not something 
an OS X user would expect; I know of no other GUI application on OS X with that 
behavior.  But it doesn't hurt.

- That said, the "sign" of the mousescroll is reversed on OS X (as Kevin 
Walzer's comment implies here (http://wiki.tcl.tk/3893): note the minus sign).

- AFAICT, "=" is not a legal Tk keysym 
(http://www.tcl.tk/man/tcl8.6/TkCmd/keysyms.htm), some Tk variants either 
ignore it, others (e.g. OS X X11) raise an exception.  Should be "equal".

- If the user repeatedly decrements the font size (either with the control(or 
command) "-" or with control-mousescroll, txtfont[1] can go negative but it 
appears Tk effectively uses its absolute value.  So the font decreases to near 
invisibility then starts to increase again.  Suggest adding a "minimum font 
size" (perhaps 8) and not allow txtfont[1] to decrease below it.

Attached patch tdemo-font-34-t3.patch addresses the above issues.

Someone should test this all with a Linux X11 setup with a mouse wheel and/or 
trackpad.  The OS X X11 Tk variant does not seem to support the mouse wheel 
events and there are hints in the above Tk mousewheel link that no X11 Tk's do 
without some hackery.  The documentation for turtledemo should be clear about 
which platforms are supported.

----------
Added file: http://bugs.python.org/file36135/tdemo-font-34-t3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21933>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to