mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
move the CPU status bar slightly to address text overflow issues
This commit is contained in:
parent
d736d54cee
commit
c8382a671a
1 changed files with 6 additions and 5 deletions
|
|
@ -166,19 +166,20 @@ fn xmain() -> ! {
|
||||||
// layout: 336 px wide
|
// layout: 336 px wide
|
||||||
// 0 150 150 200
|
// 0 150 150 200
|
||||||
// Feb 05 15:00 (00:06:23) xxxx 3.72V/-100mA/99%
|
// Feb 05 15:00 (00:06:23) xxxx 3.72V/-100mA/99%
|
||||||
const CPU_BAR_WIDTH: i16 = 50;
|
const CPU_BAR_WIDTH: i16 = 48;
|
||||||
|
const CPU_BAR_OFFSET: i16 = 4;
|
||||||
let time_rect = Rectangle::new_with_style(
|
let time_rect = Rectangle::new_with_style(
|
||||||
Point::new(0, 0),
|
Point::new(0, 0),
|
||||||
Point::new(screensize.x / 2 - CPU_BAR_WIDTH / 2 - 1, screensize.y / 2 - 1),
|
Point::new(screensize.x / 2 - CPU_BAR_WIDTH / 2 - 1 + CPU_BAR_OFFSET, screensize.y / 2 - 1),
|
||||||
DrawStyle::new(PixelColor::Light, PixelColor::Light, 0)
|
DrawStyle::new(PixelColor::Light, PixelColor::Light, 0)
|
||||||
);
|
);
|
||||||
let cpuload_rect = Rectangle::new_with_style(
|
let cpuload_rect = Rectangle::new_with_style(
|
||||||
Point::new(screensize.x / 2 - CPU_BAR_WIDTH / 2, 0),
|
Point::new(screensize.x / 2 - CPU_BAR_WIDTH / 2 + CPU_BAR_OFFSET, 0),
|
||||||
Point::new(screensize.x / 2 + CPU_BAR_WIDTH / 2, screensize.y / 2 + 1),
|
Point::new(screensize.x / 2 + CPU_BAR_WIDTH / 2 + CPU_BAR_OFFSET, screensize.y / 2 + 1),
|
||||||
DrawStyle::new(PixelColor::Light, PixelColor::Dark, 1),
|
DrawStyle::new(PixelColor::Light, PixelColor::Dark, 1),
|
||||||
);
|
);
|
||||||
let stats_rect = Rectangle::new_with_style(
|
let stats_rect = Rectangle::new_with_style(
|
||||||
Point::new(screensize.x / 2 + CPU_BAR_WIDTH / 2 + 1, 0),
|
Point::new(screensize.x / 2 + CPU_BAR_WIDTH / 2 + 1 + CPU_BAR_OFFSET, 0),
|
||||||
Point::new(screensize.x, screensize.y / 2 - 1),
|
Point::new(screensize.x, screensize.y / 2 - 1),
|
||||||
DrawStyle::new(PixelColor::Light, PixelColor::Light, 0),
|
DrawStyle::new(PixelColor::Light, PixelColor::Light, 0),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue