webview: Update visible state when hide or show (#654)

This commit is contained in:
Ylin 2025-02-25 11:49:29 +08:00 committed by GitHub
parent 9739493bce
commit 6d7f20cd4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,11 +38,13 @@ impl WebView {
pub fn show(&mut self) {
let _ = self.webview.set_visible(true);
self.visible = true;
}
pub fn hide(&mut self) {
_ = self.webview.focus_parent();
_ = self.webview.set_visible(false);
self.visible = false;
}
pub fn visible(&self) -> bool {