mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
fix less than one line check criteria
This commit is contained in:
parent
44c1b66b8b
commit
ab277a6cdd
1 changed files with 2 additions and 2 deletions
|
|
@ -216,7 +216,7 @@ fn xmain() -> ! {
|
||||||
br.y as i16 - clip_rect.tl.y as i16
|
br.y as i16 - clip_rect.tl.y as i16
|
||||||
};
|
};
|
||||||
// if less than one line of text, shrink the box
|
// if less than one line of text, shrink the box
|
||||||
let finalwidth = if c.pt.y <= c.line_height {
|
let finalwidth = if c.pt.y == 0 {
|
||||||
if c.pt.x as i16 + tv.margin.x * 3 < checkedwidth {
|
if c.pt.x as i16 + tv.margin.x * 3 < checkedwidth {
|
||||||
c.pt.x as i16 + tv.margin.x * 3
|
c.pt.x as i16 + tv.margin.x * 3
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -272,7 +272,7 @@ fn xmain() -> ! {
|
||||||
};
|
};
|
||||||
|
|
||||||
// if less than one line of text, shrink the box
|
// if less than one line of text, shrink the box
|
||||||
let finalwidth = if c.pt.y <= c.line_height {
|
let finalwidth = if c.pt.y == 0 {
|
||||||
if c.pt.x as i16 + tv.margin.x * 3 < checkedwidth {
|
if c.pt.x as i16 + tv.margin.x * 3 < checkedwidth {
|
||||||
c.pt.x as i16 + tv.margin.x * 3
|
c.pt.x as i16 + tv.margin.x * 3
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue