Saturday, February 23, 2019

#1 2019-02-02 09:41:54 am

GG
Member
Registered: 2019-01-14
Posts: 92

Minimum window dimensions for Mojave stock apps like Preview

I've found that some apps, like TextEdit, have default window dimensions. If one does not resize windows to a larger dimension, the result is "unpredictable".

Preview, being able to handle so many formats, seems to have no obvious minimum window size. I have noticed, however, that it behaves erratically after I resize it with an image already opened. If the image is larger than the resized window, it sometimes keeps the image scale and adds scroll bars. In other cases, it miniaturizes the image (makes it much smaller than the window) and does not add scroll bars.

I need to be able to display the images in a specific window size and have preview add scroll bars if the image is larger than the window.

I suspect that I may be inadvertently sizing the window below some minimum limit.

Does anyone have any experience with this issue and know how to correct it?

Model: MacBook Pro (retina)
AppleScript: 2.9
Browser: Firefox 64.0
Operating System: macOS 10.14


Added Note: I wonder if the way to solve this is by querying the following.

var minSize: NSSize
The minimum size to which the window’s frame (including its title bar) can be sized.

var maxSize: NSSize
The maximum size to which the window’s frame (including its title bar) can be sized.

Last edited by GG (2019-02-02 10:06:48 am)


Filed under: resize, preview, image

Offline

 

#2 2019-02-02 07:10:59 pm

GG
Member
Registered: 2019-01-14
Posts: 92

Re: Minimum window dimensions for Mojave stock apps like Preview

I FINALLY figured out that the issue had something to do with the "try" and "end try" statements. I moved them and it worked!

There's more things to resizing windows than just the "bounds" I guess.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)