wails icon indicating copy to clipboard operation
wails copied to clipboard

Is there any way to set zoom level?

Open e8panse opened this issue 3 years ago • 4 comments

How to achieve the same functionality as web browser, to have native zoom level? In chromium there is .setZoomLevel(level) function.

If I just simply use: document.body.style.zoom = 1.5; on my frontend side it breaks my internal modules (monaco editor)

Is there any way to do this?

e8panse avatar Jan 03 '22 22:01 e8panse

Hi. Not currently.

leaanthony avatar Jan 10 '22 10:01 leaanthony

I will give a PR a try using Get/Put IsZoomControlEnabled

Idea would be:

  • Add an App.run option for it
  • Add API to get/set it
  • if there is an API for it, add API to get/set the zoom factor (could not find so far :)

As the reporter mentioned, use the meta to scale fonts break the layout in most cases. These are two different scale methods with different impacts. One is only for font, the other is viewport scaling as a whole. Thoughts?

pierrejoye avatar Jun 14 '22 07:06 pierrejoye

I don't have any thoughts on this. Why not try it out and see how you get on? If you are doing an App.run option then you can make it Windows only. If you want to add it to the runtime then it will need to support Linux and MacOS too.

leaanthony avatar Jun 14 '22 09:06 leaanthony

I don't have any thoughts on this. Why not try it out and see how you get on? If you are doing an App.run option then you can make it Windows only. If you want to add it to the runtime then it will need to support Linux and MacOS too.

Will do the option today :)

pierrejoye avatar Jun 15 '22 03:06 pierrejoye

Merged!

leaanthony avatar Oct 16 '22 10:10 leaanthony