mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-06 11:35:27 +00:00
hide suggestion popover on activate navigation entry
This commit is contained in:
parent
907dcd4893
commit
3e4423eca7
2 changed files with 15 additions and 7 deletions
|
|
@ -22,8 +22,8 @@ pub struct Suggestion {
|
|||
list_store: ListStore,
|
||||
request: Entry,
|
||||
profile: Rc<Profile>,
|
||||
popover: Popover,
|
||||
pub signal_handler_id: Rc<RefCell<Option<SignalHandlerId>>>,
|
||||
pub popover: Popover,
|
||||
}
|
||||
|
||||
impl Suggestion {
|
||||
|
|
@ -133,6 +133,8 @@ impl Suggestion {
|
|||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
||||
pub fn update(&self, limit: Option<usize>) {
|
||||
use gtk::prelude::EditableExt;
|
||||
use itertools::Itertools;
|
||||
|
|
@ -155,12 +157,15 @@ impl Suggestion {
|
|||
.child()
|
||||
.unwrap()
|
||||
.downcast_ref::<gtk::ScrolledWindow>()
|
||||
.unwrap()
|
||||
.set_height_request(-1);
|
||||
.unwrap();
|
||||
self.popover.popup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.popover.popdown();
|
||||
self.hide();
|
||||
}
|
||||
|
||||
pub fn hide(&self) {
|
||||
self.popover.popdown()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue