Fix panic with empty content in ScrollView

This commit is contained in:
Alexandre Bury 2018-08-20 13:34:47 -07:00
parent acc1405c2a
commit 2167ba68a1

View File

@ -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 {