mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Merge pull request #212 from T045T/friendly_select_view
make SelectView less greedy
This commit is contained in:
commit
feeedfd4a0
@ -677,7 +677,9 @@ impl<T: 'static> View for SelectView<T> {
|
|||||||
// Add 2 spaces for the scrollbar if we need
|
// Add 2 spaces for the scrollbar if we need
|
||||||
let w = if scrolling { w + 2 } else { w };
|
let w = if scrolling { w + 2 } else { w };
|
||||||
|
|
||||||
Vec2::new(w, h)
|
// Don't request more than we're offered - we can scroll,
|
||||||
|
// after all
|
||||||
|
Vec2::new(w, min(h, req.y))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user