mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Fix panic with empty content in ScrollView
This commit is contained in:
parent
acc1405c2a
commit
2167ba68a1
@ -376,7 +376,7 @@ where
|
|||||||
|
|
||||||
fn scrollbar_thumb_lengths(&self) -> Vec2 {
|
fn scrollbar_thumb_lengths(&self) -> Vec2 {
|
||||||
let available = self.available_size();
|
let available = self.available_size();
|
||||||
(available * available / self.inner_size).or_max((1, 1))
|
(available * available / self.inner_size.or_max((1,1))).or_max((1, 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scrollbar_thumb_offsets(&self, lengths: Vec2) -> Vec2 {
|
fn scrollbar_thumb_offsets(&self, lengths: Vec2) -> Vec2 {
|
||||||
|
Loading…
Reference in New Issue
Block a user