mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-10-08 12:16:43 +02:00
fix underflows
This commit is contained in:
parent
3a55f2fb18
commit
87d1c0a811
1 changed files with 6 additions and 6 deletions
|
|
@ -214,19 +214,19 @@ pub fn bar_areas <'a, S: Screen> (
|
|||
Ok(match split {
|
||||
Split::South => (
|
||||
Some(XYWH(x0, y0, w0, n)),
|
||||
Some(XYWH(x0, y0 + n, w0, h0 - n)),
|
||||
Some(XYWH(x0, y0 + n, w0, h0.minus(n))),
|
||||
),
|
||||
Split::East => (
|
||||
Some(XYWH(x0, y0, n, h0)),
|
||||
Some(XYWH(x0 + n, y0, w0 - n, h0)),
|
||||
Some(XYWH(x0 + n, y0, w0.minus(n), h0)),
|
||||
),
|
||||
Split::North => (
|
||||
Some(XYWH(x0, y0 + h0 - n, w0, n)),
|
||||
Some(XYWH(x0, y0, w0, h0 - n)),
|
||||
Some(XYWH(x0, (y0 + h0).minus(n), w0, n)),
|
||||
Some(XYWH(x0, y0, w0, h0.minus(n))),
|
||||
),
|
||||
Split::West => (
|
||||
Some(XYWH(x0 + w0 - n, y0, n, h0)),
|
||||
Some(XYWH(x0, y0, w0 - n, h0)),
|
||||
Some(XYWH((x0 + w0).minus(n), y0, n, h0)),
|
||||
Some(XYWH(x0, y0, w0.minus(n), h0)),
|
||||
),
|
||||
Split::Above | Split::Below => (
|
||||
Some(XYWH(x0, y0, w0, h0)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue