mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make custom columns using bool icons put text values under the icons.
This commit is contained in:
parent
9f220fb79b
commit
1005fce494
@ -634,13 +634,12 @@ class BooksModel(QAbstractTableModel): # {{{
|
||||
|
||||
def bool_type_decorator(r, idx=-1, bool_cols_are_tristate=True):
|
||||
val = force_to_bool(self.db.data[r][idx])
|
||||
if val is None:
|
||||
if not bool_cols_are_tristate:
|
||||
if val is None or not val:
|
||||
return self.bool_no_icon
|
||||
return None
|
||||
if val:
|
||||
return self.bool_yes_icon
|
||||
if val is None:
|
||||
return self.bool_blank_icon
|
||||
return self.bool_no_icon
|
||||
|
||||
def ondevice_decorator(r, idx=-1):
|
||||
|
Loading…
x
Reference in New Issue
Block a user