mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-19 04:03:21 +02:00
Add a tweak to turn off the highlighting of the book count when using a virtual library
This commit is contained in:
parent
91bce0e175
commit
29f9e455a7
2 changed files with 9 additions and 2 deletions
|
|
@ -531,3 +531,8 @@
|
|||
# number here. The default is ten libraries.
|
||||
many_libraries = 10
|
||||
|
||||
#: Highlight the count of books when using a Virtual Library
|
||||
# The count of books next to the Virtual Library button is highlighted in
|
||||
# yellow when using a Virtual Library. By setting this to False, you can turn
|
||||
# that off.
|
||||
highlight_virtual_library_book_count = True
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
from calibre.gui2 import error_dialog, question_dialog
|
||||
from calibre.gui2.widgets import ComboBoxWithHelp
|
||||
from calibre.utils.config_base import tweaks
|
||||
from calibre.utils.icu import sort_key
|
||||
from calibre.utils.search_query_parser import ParseException
|
||||
from calibre.utils.search_query_parser import saved_searches
|
||||
|
|
@ -576,8 +577,9 @@ def set_number_of_books_shown(self):
|
|||
rows = self.current_view().row_count()
|
||||
rbc = max(rows, db.data.get_search_restriction_book_count())
|
||||
t = _("({0} of {1})").format(rows, rbc)
|
||||
self.search_count.setStyleSheet(
|
||||
'QLabel { border-radius: 8px; background-color: yellow; }')
|
||||
if tweaks['highlight_virtual_library_book_count']:
|
||||
self.search_count.setStyleSheet(
|
||||
'QLabel { border-radius: 8px; background-color: yellow; }')
|
||||
else: # No restriction or not library view
|
||||
if not self.search.in_a_search():
|
||||
t = _("(all books)")
|
||||
|
|
|
|||
Loading…
Reference in a new issue