mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
Trim the Rust ComponentWindow API and implementation a little bit
* Remove the `new` function from the main impl and use the slightly less visible From conversion trait * Make the inner Rc<Window> pub(crate) instead of pub * Instead, provide a public as_any() accessor that the Qt backend can use
This commit is contained in:
parent
492af0f67c
commit
2553dd1459
6 changed files with 27 additions and 25 deletions
|
@ -34,7 +34,7 @@ pub struct TestingBackend {
|
|||
|
||||
impl sixtyfps_corelib::backend::Backend for TestingBackend {
|
||||
fn create_window(&'static self) -> ComponentWindow {
|
||||
ComponentWindow::new(Window::new(|_| Rc::new(TestingWindow::default())))
|
||||
Window::new(|_| Rc::new(TestingWindow::default())).into()
|
||||
}
|
||||
|
||||
fn run_event_loop(&'static self, _behavior: sixtyfps_corelib::backend::EventLoopQuitBehavior) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue