Skip to content
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

Feature request: Remember QL window size and position between uses #134

Open
martinpk opened this issue Jul 10, 2024 · 5 comments
Open

Feature request: Remember QL window size and position between uses #134

martinpk opened this issue Jul 10, 2024 · 5 comments

Comments

@martinpk
Copy link

It would be helpful if QLMarkdown would remember the QuickLook window size and position between uses, especially on wider displays. On my ultrawide display, the window is three times as wide as the markdown render area, and seemingly randomly positioned.

Thanks for a great QL plugin, @sbarex!

@sbarex
Copy link
Owner

sbarex commented Aug 5, 2024

I am sorry, but Apple does not provide APIs to set or register the position and size of the QL window. It should be the operating system that remembers these settings

@martinpk
Copy link
Author

martinpk commented Aug 6, 2024

On further experimentation, the OS seems to be trying to restore the window to the same position, but given that the QL Markdown window is so wide, it's choosing the nearest on-screen coordinates to contain the whole window, which can be quite different from the previous position. Do you have any control over the width of the window? It's actually about 5x (not 3x as I said above) the width of the content render area. I haven't seen this with other plugins

For example:
image

It seems to do this with a variety of MD files.

The QL plugin for .csv files, for example, seems to set the window width to match the content; but maybe that's an Apple plugin that uses an undocumented API or something.

image

@sbarex
Copy link
Owner

sbarex commented Aug 6, 2024

On the app, you can set a fixed window size:

Screenshot 2024-08-06 alle 15 49 26

@martinpk
Copy link
Author

martinpk commented Aug 6, 2024

Thank you!

I hadn't noticed that since, by default, it says "Quick Look window: Auto", and I had not explored the options. Would it help discoverability to label it "QL window size:" and/or show the size fields grayed out when on Auto? Also add "(w)" and "(h)" after the fields?

Could your calculation of the Auto size have a maximum, so that it doesn't produce ultra-wide windows on ultra-wide monitors by default?

Again, thanks for a great plugin!

@sbarex
Copy link
Owner

sbarex commented Aug 6, 2024

"auto" means that the size is left to the operating system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants