forge
Explore
Log in

Don't you dare go Hollow

layout/scrolling: Use early return in tiles_origin()

Browse files at this commit

0c59fc304c86e20b07e44c09d49a6798300e3957Ivan MolodetskikhParent: abd7f1d
src/layout/scrolling.rsmodified+7 -3
@@ -3973,11 +3973,15 @@ impl<W: LayoutElement> Column<W> {
3973 }3973 }
3974 3974
3975 fn tiles_origin(&self) -> Point<f64, Logical> {3975 fn tiles_origin(&self) -> Point<f64, Logical> {
3976+ let mut origin = Point::from((0., 0.));
3977+
3976 if self.is_fullscreen {3978 if self.is_fullscreen {
3977- Point::from((0., 0.))3979+ return origin;
3978- } else {
3979- Point::from((0., self.working_area.loc.y + self.options.gaps))
3980 }3980 }
3981+
3982+ origin.y += self.working_area.loc.y + self.options.gaps;
3983+
3984+ origin
3981 }3985 }
3982 3986
3983 // HACK: pass a self.data iterator in manually as a workaround for the lack of method partial3987 // HACK: pass a self.data iterator in manually as a workaround for the lack of method partial