We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import { VerticalBox } from "std-widgets.slint"; export component Application inherits Window { no-frame: true; preferred-width: 400px; preferred-height: 300px; callback minimize-window(); callback maximize-window(); VerticalBox { Text { text: "minimize"; vertical-alignment: center; horizontal-alignment: center; height: 50px; TouchArea { clicked => { if (self.pressed && self.enabled) { root.minimize-window(); } } } } Text { text: "maximize"; vertical-alignment: center; horizontal-alignment: center; height: 50px; TouchArea { clicked => { if (self.pressed && self.enabled) { root.maximize-window(); } } } } } } use slint::ComponentHandle; pub mod appwin { include!(env!("SLINT_INCLUDE_APP")); } fn main() { let app = appwin::Application::new().unwrap(); let min_handle = app.as_weak(); let max_handle = app.as_weak(); app.on_minimize_window(move || { println!("on_minimize_window"); let handle = min_handle.upgrade().unwrap(); handle.window().set_minimized(true); }); app.on_maximize_window(move || { println!("on_maximize_window"); let handle = max_handle.upgrade().unwrap(); handle.window().set_maximized(true); }); app.run(); }
The text was updated successfully, but these errors were encountered:
I can reproduce this. It works with the Qt backend, but not with the winit backend.
Sorry, something went wrong.
winit issues #3537
No branches or pull requests
The text was updated successfully, but these errors were encountered: