feat: add window title api

This commit is contained in:
mrxiaozhuox committed 2022-02-10 12:35:17 +08:00
1 parent 67766c7b59
commit 6eaad850ee
2 files changed
+15

No files matched your search

+8
View File
@@ -321,6 +321,12 @@ pub fn launch_with_props<P: 'static + Send>(
window.set_focus();
}
}
UserWindowEvent::Title(content) => {
for webview in desktop.webviews.values() {
let window = webview.window();
window.set_title(&content);
}
}
}
}
Event::MainEventsCleared => {}
@@ -338,6 +344,8 @@ pub enum UserWindowEvent {
DragWindow,
CloseWindow,
FocusWindow,
Title(String),
Minimize(bool),
Maximize(bool),
}