webview: Update visible state when hide or show (#654)
This commit is contained in:
parent
9739493bce
commit
6d7f20cd4f
1 changed files with 2 additions and 0 deletions
|
|
@ -38,11 +38,13 @@ impl WebView {
|
||||||
|
|
||||||
pub fn show(&mut self) {
|
pub fn show(&mut self) {
|
||||||
let _ = self.webview.set_visible(true);
|
let _ = self.webview.set_visible(true);
|
||||||
|
self.visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn hide(&mut self) {
|
pub fn hide(&mut self) {
|
||||||
_ = self.webview.focus_parent();
|
_ = self.webview.focus_parent();
|
||||||
_ = self.webview.set_visible(false);
|
_ = self.webview.set_visible(false);
|
||||||
|
self.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn visible(&self) -> bool {
|
pub fn visible(&self) -> bool {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue