fix: pad_rect typos

This commit is contained in:
Ashley Wulber 2026-04-27 18:57:48 -04:00 committed by Victoria Brekenfeld
parent db06770a6b
commit 77f57a656d
2 changed files with 4 additions and 4 deletions

View file

@ -111,11 +111,11 @@ pub fn pad_rect(
padding: &[i32; 4],
) -> Option<Rectangle<i32, Logical>> {
rect.size.h = rect.size.h.checked_sub(padding[0])?;
rect.loc.x += padding[0];
rect.loc.x += padding[3];
rect.size.w = rect.size.w.checked_sub(padding[1])?;
rect.size.h = rect.size.h.checked_sub(padding[2])?;
rect.size.w = rect.size.w.checked_sub(padding[3])?;
rect.loc.y += padding[3];
rect.loc.y += padding[0];
Some(rect)
}