Get size hint for zoomed page

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Get size hint for zoomed page

Postby mezdej » Tue Dec 12, 2017 6:06 am

Is it possible to get size that will fit zoomed page so I will be able to resize window and show it without scrollbars?
mezdej
Techie
 
Posts: 31
Joined: Tue Oct 22, 2013 3:56 am

Re: Get size hint for zoomed page

Postby magreenblatt » Tue Dec 12, 2017 1:12 pm

You can use CefBrowserHost::SetAutoResizeEnabled and CefDisplayHandler::OnAutoResize.
magreenblatt
Site Admin
 
Posts: 12384
Joined: Fri May 29, 2009 6:57 pm

Re: Get size hint for zoomed page

Postby mezdej » Thu Dec 14, 2017 1:39 am

Thanks!

It almost "works" :)
Reducing the zoom scale does not reduce the height of the window.
But if window is already smaller then applying the same zoom can give the correct result.

Code: Select all
2017-12-14 07:32:44.567 window auto resize (298,158) (this looks great)
2017-12-14 07:32:48.998 window auto resize (308,163) + zoom
2017-12-14 07:32:53.554 window auto resize (318,169) + zoom
2017-12-14 07:32:54.926 window auto resize (308,169) - zoom
2017-12-14 07:32:55.736 window auto resize (298,169) - zoom (zoom same as the first but height is wrong)


Changing window size before zooming in is not helping
mezdej
Techie
 
Posts: 31
Joined: Tue Oct 22, 2013 3:56 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 49 guests