Skip to content

Commit

Permalink
Fixed Battery float percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Dec 7, 2023
1 parent 1de6adc commit 6894621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wideboy/scenes/default/tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions wideboy/sprites/tile_grid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6894621

Please sign in to comment.