mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make location view one line shorter
This commit is contained in:
parent
2b9196802e
commit
c4022017e9
@ -267,10 +267,10 @@ class LocationModel(QAbstractListModel):
|
|||||||
QVariant(QIcon(I('reader.svg'))),
|
QVariant(QIcon(I('reader.svg'))),
|
||||||
QVariant(QIcon(I('sd.svg'))),
|
QVariant(QIcon(I('sd.svg'))),
|
||||||
QVariant(QIcon(I('sd.svg')))]
|
QVariant(QIcon(I('sd.svg')))]
|
||||||
self.text = [_('Library\n%d\nbooks'),
|
self.text = [_('Library\n%d books'),
|
||||||
_('Reader\n%s\navailable'),
|
_('Reader\n%s'),
|
||||||
_('Card A\n%s\navailable'),
|
_('Card A\n%s'),
|
||||||
_('Card B\n%s\navailable')]
|
_('Card B\n%s')]
|
||||||
self.free = [-1, -1, -1]
|
self.free = [-1, -1, -1]
|
||||||
self.count = 0
|
self.count = 0
|
||||||
self.highlight_row = 0
|
self.highlight_row = 0
|
||||||
@ -309,7 +309,12 @@ class LocationModel(QAbstractListModel):
|
|||||||
elif role == Qt.DecorationRole:
|
elif role == Qt.DecorationRole:
|
||||||
data = self.icons[drow]
|
data = self.icons[drow]
|
||||||
elif role == Qt.ToolTipRole:
|
elif role == Qt.ToolTipRole:
|
||||||
data = QVariant(self.tooltips[drow])
|
ans = self.tooltips[row]
|
||||||
|
if row > 0:
|
||||||
|
fs = self.free[drow-1]
|
||||||
|
if fs > -1:
|
||||||
|
ans += '\n\n%s '%(human_readable(fs)) + _('free')
|
||||||
|
data = QVariant(ans)
|
||||||
elif role == Qt.SizeHintRole:
|
elif role == Qt.SizeHintRole:
|
||||||
data = QVariant(QSize(155, 90))
|
data = QVariant(QSize(155, 90))
|
||||||
elif role == Qt.FontRole:
|
elif role == Qt.FontRole:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user