mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
layout/scrolling: Use early return in tiles_origin()
This commit is contained in:
@@ -3973,11 +3973,15 @@ impl<W: LayoutElement> Column<W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn tiles_origin(&self) -> Point<f64, Logical> {
|
fn tiles_origin(&self) -> Point<f64, Logical> {
|
||||||
|
let mut origin = Point::from((0., 0.));
|
||||||
|
|
||||||
if self.is_fullscreen {
|
if self.is_fullscreen {
|
||||||
Point::from((0., 0.))
|
return origin;
|
||||||
} else {
|
|
||||||
Point::from((0., self.working_area.loc.y + self.options.gaps))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
origin.y += self.working_area.loc.y + self.options.gaps;
|
||||||
|
|
||||||
|
origin
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: pass a self.data iterator in manually as a workaround for the lack of method partial
|
// HACK: pass a self.data iterator in manually as a workaround for the lack of method partial
|
||||||
|
|||||||
Reference in New Issue
Block a user