mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
fix input redraw
This commit is contained in:
parent
ec86a9ecd0
commit
b8b5eee4fe
3 changed files with 11 additions and 23 deletions
|
|
@ -19,19 +19,12 @@ impl Widget {
|
|||
}
|
||||
|
||||
// Actions
|
||||
pub fn show(&self) {
|
||||
self.gobject.set_visible(true)
|
||||
}
|
||||
|
||||
pub fn hide(&self) {
|
||||
self.gobject.set_visible(false)
|
||||
}
|
||||
|
||||
pub fn set_child(&self, child: Option<&Box>) {
|
||||
pub fn update(&self, child: Option<&Box>) {
|
||||
if child.is_some() {
|
||||
self.gobject.set_visible(true); // widget may be hidden, make it visible to child redraw
|
||||
self.gobject.set_child(child);
|
||||
} else {
|
||||
self.hide()
|
||||
self.gobject.set_visible(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue