Add wxWebView::SetZoomFactor(float) and GetZoomFactor()
The new method allows to set the zoom level more precisely than the existing SetZoom(wxWebViewZoom). Also improve the webview sample by using radio menu items instead of check items and manually resetting them. Closes https://github.com/wxWidgets/wxWidgets/pull/1894 Closes #18769.
This commit is contained in:
committed by
Vadim Zeitlin
parent
dc9040cc89
commit
895424ecc0
@@ -913,6 +913,10 @@ wxWebViewZoom wxWebViewWebKit::GetZoom() const
|
||||
return wxWEBVIEW_ZOOM_LARGEST;
|
||||
}
|
||||
|
||||
float wxWebViewWebKit::GetZoomFactor() const
|
||||
{
|
||||
return GetWebkitZoom();
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom)
|
||||
{
|
||||
@@ -944,6 +948,11 @@ void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom)
|
||||
}
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::SetZoomFactor(float zoom)
|
||||
{
|
||||
SetWebkitZoom(zoom);
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::SetZoomType(wxWebViewZoomType type)
|
||||
{
|
||||
WebKitSettings* settings = webkit_web_view_get_settings(m_web_view);
|
||||
|
Reference in New Issue
Block a user