mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
When the size of a book is less that 0.1MB display the size as <0.1 instead of 0.0. Fixes #755768 (RFE: change units in size column)
This commit is contained in:
parent
9fc2c6919a
commit
e9fc4d4caa
1 changed files with 4 additions and 1 deletions
|
|
@ -604,7 +604,10 @@ def series_type(r, idx=-1, siix=-1):
|
|||
def size(r, idx=-1):
|
||||
size = self.db.data[r][idx]
|
||||
if size:
|
||||
return QVariant('%.1f'%(float(size)/(1024*1024)))
|
||||
ans = '%.1f'%(float(size)/(1024*1024))
|
||||
if ans == '0.0':
|
||||
ans = '<0.1'
|
||||
return QVariant(ans)
|
||||
return None
|
||||
|
||||
def rating_type(r, idx=-1):
|
||||
|
|
|
|||
Loading…
Reference in a new issue