Skip to content

Commit dc85c05

Browse files
author
Josh Brandoff
committed
Use int() to remove trailing zero from round()
1 parent 3e8d0de commit dc85c05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

driveshare.kv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
text: 'Storage Space'
298298
y: int(self.parent.height/2) + 17
299299
RelThickLabel:
300-
text: str(round(app.used_space/app.allocated_space*100)) + ' %'
300+
text: str(int(round(app.used_space/app.allocated_space*100))) + ' %'
301301
y: int(self.parent.height/2) + 17
302302
right: self.parent.width + 0*self.width
303303
RelThinLabel:
@@ -318,14 +318,14 @@
318318
LabelTypeUpper:
319319
text: 'FREE'
320320
LabelTypeLower:
321-
text: str(round((app.allocated_space - app.used_space) / app.denominator_factor)) + ' ' + app.denominator
321+
text: str(int(round((app.allocated_space - app.used_space) / app.denominator_factor))) + ' ' + app.denominator
322322
ElementLayout:
323323
RelativeLayout:
324324
orientation: 'vertical'
325325
LabelTypeUpper:
326326
text: 'USED'
327327
LabelTypeLower:
328-
text: str(round(app.used_space / app.denominator_factor)) + ' ' + app.denominator
328+
text: str(int(round(app.used_space / app.denominator_factor))) + ' ' + app.denominator
329329
ElementLayout:
330330
size_hint: None, 1,
331331
width: int(self.parent.width/3)
@@ -334,7 +334,7 @@
334334
LabelTypeUpper:
335335
text: 'TOTAL'
336336
LabelTypeLower:
337-
text: str(round(app.allocated_space / app.denominator_factor)) + ' ' + app.denominator
337+
text: str(int(round(app.allocated_space / app.denominator_factor))) + ' ' + app.denominator
338338
NavButtonContainer:
339339
NavButton:
340340
text: 'SETTINGS'

0 commit comments

Comments
 (0)