|
@@ -7,8 +7,8 @@ fn main() {
|
|
|
|
|
|
fn app(cx: Scope) -> Element {
|
|
fn app(cx: Scope) -> Element {
|
|
let window = use_window(cx);
|
|
let window = use_window(cx);
|
|
-
|
|
|
|
let level = use_state(cx, || 1.0);
|
|
let level = use_state(cx, || 1.0);
|
|
|
|
+
|
|
cx.render(rsx! {
|
|
cx.render(rsx! {
|
|
input {
|
|
input {
|
|
r#type: "number",
|
|
r#type: "number",
|
|
@@ -16,7 +16,7 @@ fn app(cx: Scope) -> Element {
|
|
oninput: |e| {
|
|
oninput: |e| {
|
|
let num = e.value.parse::<f64>().unwrap_or(1.0);
|
|
let num = e.value.parse::<f64>().unwrap_or(1.0);
|
|
level.set(num);
|
|
level.set(num);
|
|
- window.set_zoom_level(num);
|
|
|
|
|
|
+ window.webview.zoom(num);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|