This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients Lita.Cho, jesstess, ned.deily, serhiy.storchaka, terry.reedy
Date 2014-07-28.02:53:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406516030.64.0.258726254565.issue21933@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-07-28 02:53:50ned.deilysetrecipients: + ned.deily, terry.reedy, jesstess, serhiy.storchaka, Lita.Cho
2014-07-28 02:53:50ned.deilysetmessageid: <1406516030.64.0.258726254565.issue21933@psf.upfronthosting.co.za>
2014-07-28 02:53:50ned.deilylinkissue21933 messages
2014-07-28 02:53:48ned.deilycreate