Serhiy Storchaka added the comment:
Unfortunately the bug on X11 is still here. Ctrl+mouse wheel not only changes
font, but scrolls a text.
--
resolution: fixed -
stage: resolved -
status: closed - open
___
Python tracker rep...@bugs.python.org
Terry J. Reedy added the comment:
I am aware of this because the Windows has the same behavior. As I noted in my
post to #17642, I consider this behavior a tolerable glitch rather than a
patch-blocking bug for turtledemo because the text is relatively short and read
only, so there is no issue
Serhiy Storchaka added the comment:
Here is a patch which should fix this bug. In additional it fixes a bug on
MacOS: mouse wheel only increased font size.
--
Added file: http://bugs.python.org/file36532/turtledemo_change_font_size.patch
___
Python
Terry J. Reedy added the comment:
Great. That works better on Windows too. Attached is an augmented patch to also
move the other size bindings to text (I verified that 'bind_all' is needed),
move the resize binding back to where it was, delete the now-empty binding
function, and add a not to
Serhiy Storchaka added the comment:
This works on X11 (Linux).
Actually it doesn't matter for what widget you call bind_all(). It works
globally.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21933
Roundup Robot added the comment:
New changeset ecc98ea50bc3 by Terry Jan Reedy in branch '3.4':
Issue #21933: Make Control-Mousewhell only change font size and not also scroll.
http://hg.python.org/cpython/rev/ecc98ea50bc3
--
___
Python tracker
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21933
___
Roundup Robot added the comment:
New changeset ce14092430b6 by Terry Jan Reedy in branch '3.4':
Issue #21933: Users can now change the font size for example code.
http://hg.python.org/cpython/rev/ce14092430b6
New changeset e2e0c9f90a81 by Terry Jan Reedy in branch 'default':
Issue #21933: Merge
Terry J. Reedy added the comment:
I refactored the callbacks to eliminate duplication. I had to redo the menu
addition to work with the new menu. This works great on Windows. I am
confident I did not change the logic, but it would still be good if someone
tried font changing again on linux
Terry J. Reedy added the comment:
Lita, thank you for sticking with this. #17642 is about doing something similar
for Idle. The issue is necessarily more complicated, but what we learned here
about system difference and tk behavior oddities will be needed for Idle too.
I am making 'what we
Lita Cho added the comment:
ping!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21933
___
___
Python-bugs-list mailing list
Unsubscribe:
Terry J. Reedy added the comment:
I am working on backporting the #10291 patch and re-synchronizing 3.4 and 3.5
so revised version of this patch, including help change, and of #22065 patch
can merge forward properly.
--
___
Python tracker
Lita Cho added the comment:
Hi Terry,
I've added to the patch, so that the user is able to change the font size
through the GUI. I tried to match Google Doc's behaviour. I also added a max
font size. I choose 400 since that is what Google Docs limits their font size.
If you prefer to split
Serhiy Storchaka added the comment:
On X11 Button-4 and Button-5 events are generated on mouse wheel roll. So
you should add
widget.bind('Control-Button-4', self._increaseFont)
widget.bind('Control-Button-5', self._decreaseFont)
But mouse wheel events still are sent to widget
Terry J. Reedy added the comment:
While we are at it, lets compute sys.platform == 'darwin' just once and use
conditional expressions. (I just condensed config_gui() with conditional
expressions, but avoided changing the context for the patches here.)
--
Added file:
Serhiy Storchaka added the comment:
In 3.5 lists should work as fine as tuples. But in earlier version it would be
safer to convert list to tuple.
Configure's value is preprocessed in Misc._options. If it is a tuple or a list
with only int and str items, it will stringified. But if a list
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
Lita Cho added the comment:
I was going to add a dropdown menu to change the font size as well, but I am
going to wait till Serhiy's patch gets committed in issue22065 before I submit
my patch.
--
___
Python tracker rep...@bugs.python.org
Terry J. Reedy added the comment:
v3 missed 3 of the 4 fixes I requested. I would like to commit the attached
simplified version of v3 that includes all fixes, leaves txtfont global as a
list, and uses subscripting consistently instead of .config. But I would first
like confirmation that
Lita Cho added the comment:
Hi Terry,
I originally had txtfont as a list, but I guess I was worried about readability
and accessing attributes by indices being unpythonic. But I might have been
over-doing it for this case. :)
In Mac, you don't need to divide event.delta by 120, only Windows
Lita Cho added the comment:
Here is an updated version of the patch now that Terry submitted the changes
from issue21597.
--
Added file: http://bugs.python.org/file36077/window_pane_font_size_v3.patch
___
Python tracker rep...@bugs.python.org
Lita Cho added the comment:
Oops! I was suppose to add 'Control' not 'Ctrl'. I can fix that quickly but I
will wait till the other patch goes through.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21933
Terry J. Reedy added the comment:
I plan to commit the sash patch before reviewing this. I would wait until then
to do a separate patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21933
Terry J. Reedy added the comment:
MOUSEWHEEL should continue to scroll.
CONTROL+MOUSEWHEEL should change font size, as you said at the beginning.
At least on Windows, this seems pretty standard: Internet Explorer, Firefox,
Notepad++, LibreOffice (and, I imagin, OpenOffice, and Word),
Lita Cho added the comment:
Sounds good. I can wait till the sash code gets incorporated in order to
add in the font code.
I would have to generate a MOUSEWHEEL event and see if it fails. I have
generated mouse clicks before. I'll try to see if I can generate a
MOUSEWHEEL event and if it
Ned Deily added the comment:
Lita, I tried the patch. From the perspective of an OS X user, while I might
expect that using the zoom gesture on a mousepad or using a mousewheel (the
equivalent) to increase or decrease the font size, I would even more expect
scrolling to work especially if
Lita Cho added the comment:
I completely agree about the mousewheel. However, would it make sense for
OS X to combine command with mousewheel? I have never seen that before. I
am not sure if I can bind the zoom gesture with tkinter, but I can find
out.
I also think the shortcuts are not
Ned Deily added the comment:
On OS X, the actions associated with trackpad gestures are controlled by the
Trackpad panel of System Preferences. The default settings map the pinch with
two fingers gesture to Zoom in or out which Tk apps see as Mousewheel
events: no programming needed!
Lita Cho added the comment:
What really? That is so awesome! I will check that out!
However, I figure I still need to create separate bindings for Linux,
Windows and Mac, right? Or does Tkinter unify all the mousewheel events?
Lita
On Tue, Jul 22, 2014 at 12:18 AM, Ned Deily
Ned Deily added the comment:
However, I figure I still need to create separate bindings for Linux,
Windows and Mac, right? Or does Tkinter unify all the mousewheel events?
I'm not sure I understand: I think that Tk only provides one MouseWheel event
binding. Keyboard or menu items might
Lita Cho added the comment:
Oh I see. And then pinch on the trackpad just generates a overall MouseWheel
event, not a specific zoom-in event. For some reason, I thought there was a
different event depending on operating systems. Before, Linux would trigger
Button-4 and Button-5 events and not
Lita Cho added the comment:
I've added it so that if the OS is Mac, it will use Command-minus and
Command-=. If it is on Windows, it uses Ctrl-minus and Ctrl-= (I wasn't sure if
Windows uses shift sa well, but I don't think it does.)
When I tried the pinch movement in Mac, the MouseWheel
Terry J. Reedy added the comment:
On windows, new patch gives this:
Traceback (most recent call last):
File F:\Python\dev\4\py34\Lib\turtledemo\__main__.py, line 295, in module
demo = DemoWindow()
File F:\Python\dev\4\py34\Lib\turtledemo\__main__.py, line 73, in __init__
graph_frame
Lita Cho added the comment:
Sounds good. I will wait till #21587 and create a small patch afterwards.
Thanks!
On Tue, Jul 22, 2014 at 9:33 PM, Terry J. Reedy rep...@bugs.python.org
wrote:
Terry J. Reedy added the comment:
On windows, new patch gives this:
Traceback (most recent call
Lita Cho added the comment:
I have a version of this working with Ctrl-plus and Ctrl-minus. However, there
is a bug with Tk 8.5.9 where binding to MouseWheel crashes Tkinter for Macs
(issue10731), which I am running into. I need to update Tkinter to see if this
works.
--
Lita Cho added the comment:
Here is a patch for changing the font size using the scroll wheel. I also added
the shortcuts Ctrl-plus to increase the font size and Ctrl-minus to
decrease the font size.
However, since the MouseWheel is now bound to changing the font
size, the canvas won't
New submission from Lita Cho:
Currently, the turtledemo doesn't allow you to change font sizes of the demo
code, and the default font size is really small.
I can work on creating a patch to fix this. Best option be to have
control-mousewheel change size, as is standard in browsers, as well as
37 matches
Mail list logo