watch: smarter battery display

This commit is contained in:
galister
2024-02-17 02:30:33 +01:00
parent ba9ba876dc
commit 68baa3a1ef
4 changed files with 65 additions and 16 deletions

View File

@@ -563,6 +563,15 @@ impl<D, S> Control<D, S> {
self.dirty = true;
}
#[inline(always)]
pub fn set_fg_color(&mut self, color: Vec3) {
if self.fg_color == color {
return;
}
self.fg_color = color;
self.dirty = true;
}
fn render_rect(
&self,
canvas: &CanvasData<D>,