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

Dialog size doesn't match content size when using "Default zoom" setting in Firefox #84

Open
benblank opened this issue Jun 2, 2024 · 2 comments

Comments

@benblank
Copy link

benblank commented Jun 2, 2024

I set the "Default zoom" setting in Firefox to 150% in order to make pages easier to read on my laptop screen. Unfortunately, this seems to cause issues for Open in Browser, as the content of the dialog honors the zoom level (which is great!), but the dialog size doesn't (which is less great).

For example, here's a screenshot of how Open in Browser's dialogs look when they open:

a screenshot of the Open in Browser dialog when the Default zoom is 150%

However, it's clearly sizing the dialog correctly for its content if the zoom level is ignored. If I use Ctrl+MouseWheel to zoom back out to 100%1 in the same dialog which appears above, the content fits the dialog perfectly:

a screenshot of the same dialog, but zoomed back out to 100%

Footnotes

  1. Kind of… If I only zoom out to 100% (five steps), the content still overflows the dialog. But if I zoom out to 90% (six steps) and then back in to 100%, the content fits perfectly, as shown in the second screenshot.

@regs01
Copy link

regs01 commented Nov 2, 2024

It's not possible to fix, until Mozilla will implement getScreenDetails. As element bounds already taking your screen scale into account, so you need to subtract it. But there is no way to know it in Firefox right now.
https://caniuse.com/mdn-api_window_getscreendetails
https://developer.mozilla.org/en-US/docs/Web/API/ScreenDetails

As a workaround you can set 100% scale specifically for this extension, using Ctrl-- and Ctrl-+ or Ctrl-MouseWheel, as you said.

Aside that you have another problem, which is excessively huge system font size. You better reduce it to 10 pt and use scaling, which is in Display and Monitor settings of KDE, instead. And better not to use anything in between 100, 150, 200 and 300.

@benblank
Copy link
Author

benblank commented Nov 4, 2024

It's a shame it isn't directly addressable right now; hopefully, Mozilla will add support for that API as it gets closer to stable. In the meantime, I'll try page-specific zoom workaround you mention.

Aside that you have another problem, which is excessively huge system font size. You better reduce it to 10 pt and use scaling, which is in Display and Monitor settings of KDE, instead. And better not to use anything in between 100, 150, 200 and 300.

I'll have to take a look at this again, then. I've tried adjusting the scaling, but have always had issues with blurriness and overlarge UI elements, even at those scaling levels. I have to admit I'm also quite curious as to how you knew I was using a large font size without scaling just from those screenshots; it's a pretty neat party trick! 🙂

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