mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1946585 [[Enhancement] Use a less light color for the Scheduled news](https://bugs.launchpad.net/calibre/+bug/1946585)
This commit is contained in:
parent
7cb223998d
commit
431f42bae7
@ -1,27 +1,25 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||||
|
# License: GPLv3 Copyright: 2009, Kovid Goyal <kovid at kovidgoyal.net>
|
||||||
|
|
||||||
|
import copy
|
||||||
__license__ = 'GPL v3'
|
import zipfile
|
||||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
|
||||||
__docformat__ = 'restructuredtext en'
|
|
||||||
|
|
||||||
import copy, zipfile
|
|
||||||
from functools import total_ordering
|
from functools import total_ordering
|
||||||
|
from qt.core import (
|
||||||
|
QAbstractItemModel, QApplication, QFont, QIcon, QModelIndex, QPalette, QPixmap,
|
||||||
|
Qt, pyqtSignal
|
||||||
|
)
|
||||||
|
|
||||||
from qt.core import QAbstractItemModel, Qt, QColor, QFont, QIcon, \
|
|
||||||
QModelIndex, pyqtSignal, QPixmap
|
|
||||||
|
|
||||||
from calibre.utils.search_query_parser import SearchQueryParser
|
|
||||||
from calibre.utils.localization import get_language
|
|
||||||
from calibre.web.feeds.recipes.collection import \
|
|
||||||
get_builtin_recipe_collection, get_custom_recipe_collection, \
|
|
||||||
SchedulerConfig, download_builtin_recipe, update_custom_recipe, \
|
|
||||||
update_custom_recipes, add_custom_recipe, add_custom_recipes, \
|
|
||||||
remove_custom_recipe, get_custom_recipe, get_builtin_recipe
|
|
||||||
from calibre import force_unicode
|
from calibre import force_unicode
|
||||||
from calibre.utils.icu import primary_sort_key
|
from calibre.utils.icu import primary_sort_key
|
||||||
from calibre.utils.search_query_parser import ParseException
|
from calibre.utils.localization import get_language
|
||||||
|
from calibre.utils.search_query_parser import ParseException, SearchQueryParser
|
||||||
|
from calibre.web.feeds.recipes.collection import (
|
||||||
|
SchedulerConfig, add_custom_recipe, add_custom_recipes, download_builtin_recipe,
|
||||||
|
get_builtin_recipe, get_builtin_recipe_collection, get_custom_recipe,
|
||||||
|
get_custom_recipe_collection, remove_custom_recipe, update_custom_recipe,
|
||||||
|
update_custom_recipes
|
||||||
|
)
|
||||||
from polyglot.builtins import iteritems, unicode_type
|
from polyglot.builtins import iteritems, unicode_type
|
||||||
|
|
||||||
|
|
||||||
@ -85,7 +83,7 @@ class NewsCategory(NewsTreeItem):
|
|||||||
elif role == Qt.ItemDataRole.FontRole:
|
elif role == Qt.ItemDataRole.FontRole:
|
||||||
return self.bold_font
|
return self.bold_font
|
||||||
elif role == Qt.ItemDataRole.ForegroundRole and self.category == _('Scheduled'):
|
elif role == Qt.ItemDataRole.ForegroundRole and self.category == _('Scheduled'):
|
||||||
return (QColor(0, 255, 0))
|
return QApplication.instance().palette().color(QPalette.ColorRole.Link)
|
||||||
elif role == Qt.ItemDataRole.UserRole:
|
elif role == Qt.ItemDataRole.UserRole:
|
||||||
return '::category::{}'.format(self.sortq[0])
|
return '::category::{}'.format(self.sortq[0])
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user