-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial window size does not work with scaling >100% #127
Comments
Also, in case of several monitors, winfo_screenwidth and winfo_screenheight get the dimensions of the combined monitor. We need the dimension of the current monitor. |
Seems to be more difficult than that. Sometimes I also get too small images when scaling of the window manager is >100%. In this case the image thumbnail seems not to be displayed in the size it has. |
I'd love some help in fixing this, especially as I don't use non-default scaling. |
I don't use cropgui, nor do I scale my monitor (aside: I really think that is the wrong solution to the problem).
after the line If you are only interested in cropgui.py, perhaps you can hunt for some tkinter function which returns the information. (I took a 3-minute look but didn't see it, sorry I can't help more.) |
Thank you for your hints. I might consider to try to fix it in future. But unfortunately I will we very busy over the next months. Also what I found so far is quite confusing. Seems that the DragManagerBase renders the image in a size different from its actual size (i.e. the size of the thumbnail that has been set in DraManager) if a scaling is present in the window manager. And this different size is sometimes smaller and sometimes larger than the actual size. To make things worse, I have two monitors with different scaling, and it seems kind of random on which of them CropGUI opens. I've tried to debug, but another problem is that actually I've never learned python properly. My native language is C++. I do python mostly by mocking the syntax I see. As a workaround, I get acceptable results by hardcoding max_h and max_w and disabling monitor scaling when using CropGUI. |
Environment: Linux Mint 22 with Cinnamon
Not tested on other distributions or on Windows
Steps to reproduce:
Expected outcome:
Cropgui window including menu bar should fit on the screen.
The image should be scaled down appropriately.
Actual outcome:
Menu bar (Crop button, resolutions, …) are missing
Portions of the image are not shown.
Suspected cause:
I think cropgui might read the original screen size in pixels and omits to divide it by the scaling factor.
The size of the window that cropgui tries to open is automatically scaled by the scaling factor. Hence it is larger than the monitor.
The window manager limits the size to the screen size, cropping the contents of the window.
The text was updated successfully, but these errors were encountered: