Comments (4)
On modern Macs, for those who use a trackpad (tested on a MBP M1, not on a desktop with an external trackpad), control plus one of shift, option or cmd and the two-finger drag, zooming in and out works. control plus the two finger drag is a system default for zooming in on the whole screen, or a portion of the screen as set by the system preferences.
I don't know how easy it would be to implement, but certain applications allow "pinch to zoom". For instance, in this browser window, I am allowed to pinch to zoom within the browser window, and it doesn't affect anything else.
It would also be nice to see the ctrl/cmd plus + and - keyboard shortcuts implemented for zooming in and out.
from guiguts-py.
When testing, I occasionally play with the image resizing currently in place (which is pretty painful on a Mac), and I ponder images in gg2. This time, I actually did some searching, and found https://stackoverflow.com/questions/63787755/dynamic-resizing-of-image-using-pil-and-tkinter. It may ultimately not be of use, but I thought I'd mention it, just in case it is when the time comes.
from guiguts-py.
Bug discovered by @srjfoo when auto imaging through file:
I brought up gg2 in the footnotes branch (making sure ahead of time that the project actually had some footnotes: the first project I tried didn't). Opened the images. I think I resized the image: I usually do. When I do that, the image area generally comes down to where the scrollbars disappear, because I generally size the image to fit inside the image pane/set the image pane size to be no smaller in either dimension than the image.
When I opened the Footnote results list, the image area was immediately resized to max. The screenshot is designed to show that the image pane essentially doubled in height and width (according to the extra space at the botto.m and the lengths of the scrollbars that weren't there before). Actually, more than doubled. I zoomed out far enough that the scrollbars went away again, and the image is about the size of a postage stamp: about a quarter of the width of the image pane.
If I close footnote fixup, and reopen, the background for the image gets even larger, and at some point, I can't scroll out anymore.
21:35:10: ERROR - root.py:45 - Tkinter Exception
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 1967, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "/Users/<username>/dpdev/guiguts-py-3.11/src/guiguts/mainwindow.py", line 373, in wheel_scroll
self.show_image()
File "/Users/<username>/dpdev/guiguts-py-3.11/src/guiguts/mainwindow.py", line 345, in show_image
image.resize(
File "/Users/<username>/Library/Caches/pypoetry/virtualenvs/guiguts-gE8TiuTD-py3.11/lib/python3.11/site-packages/PIL/Image.py", line 2200, in resize
return self._new(self.im.resize(size, resample, box))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: height and width must be > 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 1967, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "/Users/<username>/dpdev/guiguts-py-3.11/src/guiguts/mainwindow.py", line 345, in show_image
image.resize(
File "/Users/<username>/Library/Caches/pypoetry/virtualenvs/guiguts-gE8TiuTD-py3.11/lib/python3.11/site-packages/PIL/Image.py", line 2200, in resize
return self._new(self.im.resize(size, resample, box))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: height and width must be > 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/__init__.py", line 1967, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "/Users/<username>/dpdev/guiguts-py-3.11/src/guiguts/mainwindow.py", line 345, in show_image
image.resize(
File "/Users/<username>/Library/Caches/pypoetry/virtualenvs/guiguts-gE8TiuTD-py3.11/lib/python3.11/site-packages/PIL/Image.py", line 2200, in resize
return self._new(self.im.resize(size, resample, box))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: height and width must be > 0
from guiguts-py.
Stashing python-image-processing-libraries/ for future reference.
from guiguts-py.
Related Issues (20)
- Tools->Rewrap All and Tools->Rewrap Selection add a blank line after every rewrapped paragraph HOT 1
- Issues with Tools -> Unmatched -> Block Markup HOT 5
- Improve accessibility, particularly relating to color HOT 3
- Implement Search->Find Next Proofer Comment and Search->Find Previous Proofer Comment
- Search and Replace Pop-up has the top of a line of text at the bottom. HOT 5
- Tools->Convert Fractions does not give any indication that anything happened
- Tools->Unmatched DP Markup odd report HOT 2
- Show which is the current line in line number widget HOT 1
- Add "working" to checker dialog headers
- Fix Jeebies "Check Level" radio button behaviour HOT 5
- Continue footnote work HOT 1
- Weird search behavior HOT 3
- Tools->Word Frequency Control-left click Search & Replace highlighting HOT 1
- Tools->Word Frequency window does not allow easy navigation HOT 3
- Tools-> Word Frequency Ital/Bold/SC/etc - Word Threshold setting does not work HOT 4
- Tools->Unicode->Normalize Selected Characters should be automatic on opening HOT 3
- GG2 Tools->Unicode>Compose Sequence does not replace the selected character(s). HOT 1
- Tools->Convert Fractions->Unicode Fractions inconsistently misses some HOT 3
- Current line number highlight not always updated
- Allow S/R fields (at least) to have configurable font
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guiguts-py.