fix: window zoom
This commit is contained in:
1 parent
6dfe84834d
commit
7f418bbfee
3 files changed
+9
-5
No files matched your search
@@ -7,8 +7,8 @@ fn main() {
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
let window = use_window(cx);
|
||||
|
||||
let level = use_state(cx, || 1.0);
|
||||
|
||||
cx.render(rsx! {
|
||||
input {
|
||||
r#type: "number",
|
||||
@@ -16,7 +16,7 @@ fn app(cx: Scope) -> Element {
|
||||
oninput: |e| {
|
||||
let num = e.value.parse::<f64>().unwrap_or(1.0);
|
||||
level.set(num);
|
||||
window.set_zoom_level(num);
|
||||
window.webview.zoom(num);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user