|
@@ -207,6 +207,7 @@ pub struct WebviewAttributes {
|
|
|
pub bounds: Option<Rect>,
|
|
|
pub auto_resize: bool,
|
|
|
pub proxy_url: Option<Url>,
|
|
|
+ pub zoom_hotkeys_enabled: bool,
|
|
|
}
|
|
|
|
|
|
impl From<&WindowConfig> for WebviewAttributes {
|
|
@@ -233,6 +234,7 @@ impl From<&WindowConfig> for WebviewAttributes {
|
|
|
if let Some(url) = &config.proxy_url {
|
|
|
builder = builder.proxy_url(url.to_owned());
|
|
|
}
|
|
|
+ builder = builder.zoom_hotkeys_enabled(config.zoom_hotkeys_enabled);
|
|
|
builder
|
|
|
}
|
|
|
}
|
|
@@ -255,6 +257,7 @@ impl WebviewAttributes {
|
|
|
bounds: None,
|
|
|
auto_resize: false,
|
|
|
proxy_url: None,
|
|
|
+ zoom_hotkeys_enabled: false,
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -345,6 +348,13 @@ impl WebviewAttributes {
|
|
|
self.proxy_url = Some(url);
|
|
|
self
|
|
|
}
|
|
|
+
|
|
|
+ /// Whether page zooming by hotkeys is enabled
|
|
|
+ #[must_use]
|
|
|
+ pub fn zoom_hotkeys_enabled(mut self, enabled: bool) -> Self {
|
|
|
+ self.zoom_hotkeys_enabled = enabled;
|
|
|
+ self
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// IPC handler.
|