diff --git a/wideboy/scenes/default/tiles.py b/wideboy/scenes/default/tiles.py index 67967ba..ce2a605 100644 --- a/wideboy/scenes/default/tiles.py +++ b/wideboy/scenes/default/tiles.py @@ -427,7 +427,7 @@ class CellBatteryLevel(GridCell): @property def label(self): - return template_if_defined(self.value, "{}%") + return template_if_defined(self.value, "{:.0f}%") @property def open(self): diff --git a/wideboy/sprites/tile_grid/__init__.py b/wideboy/sprites/tile_grid/__init__.py index 41ca70a..4915a66 100644 --- a/wideboy/sprites/tile_grid/__init__.py +++ b/wideboy/sprites/tile_grid/__init__.py @@ -192,8 +192,7 @@ def update(self, frame, clock, delta, events): cx += column.animator.value column.update() column.draw(self.image) - self.rect.width = cx - self.rect.height = cy + self.rect.width, self.rect.height = self.calculate_size() self.dirty = 1 if self.update_frames > 0 else 0 self.update_frames -= 1