mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
fix scrolled window height update on child items quantity change
This commit is contained in:
parent
f09bb905f9
commit
841bb171bd
1 changed files with 4 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ use gtk::{
|
|||
},
|
||||
glib::{GString, SignalHandlerId},
|
||||
prelude::{EditableExt, EntryExt, ListItemExt, WidgetExt},
|
||||
Entry, ListItem, ListView, Popover, SignalListItemFactory, SingleSelection,
|
||||
Align, Entry, ListItem, ListView, Popover, SignalListItemFactory, SingleSelection,
|
||||
INVALID_LIST_POSITION,
|
||||
};
|
||||
pub use item::Item;
|
||||
|
|
@ -63,6 +63,7 @@ impl Suggestion {
|
|||
let list_view = {
|
||||
let lv = ListView::builder()
|
||||
.show_separators(true)
|
||||
.valign(Align::Start)
|
||||
.model(&single_selection)
|
||||
.factory(&{
|
||||
let f = SignalListItemFactory::new();
|
||||
|
|
@ -112,10 +113,10 @@ impl Suggestion {
|
|||
let p = Popover::builder()
|
||||
.autohide(false)
|
||||
.can_focus(false)
|
||||
.halign(gtk::Align::Start)
|
||||
.halign(Align::Start)
|
||||
.valign(Align::Start)
|
||||
.child(
|
||||
>k::ScrolledWindow::builder()
|
||||
//.css_classes(["view"])
|
||||
.child(&list_view)
|
||||
.max_content_height(400)
|
||||
.hscrollbar_policy(gtk::PolicyType::Never)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue