From 9c0346bbb15b4213dd261b27a832ebd14e1557fb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 Sep 2019 15:28:55 +0530 Subject: [PATCH] QTextBrowser should not require explicit link color override --- resources/templates/book_details.css | 11 ++++------- src/calibre/gui2/book_details.py | 2 -- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/resources/templates/book_details.css b/resources/templates/book_details.css index cea1de43a0..f30df0a424 100644 --- a/resources/templates/book_details.css +++ b/resources/templates/book_details.css @@ -1,14 +1,12 @@ -a { +a { text-decoration: none; - /* LINK_COLOR below will be replaced with the link color defined by the current color theme */ - color: LINK_COLOR } a:hover { color: red } -.comments { +.comments { margin-top: 0; padding-top: 0; text-indent: 0 @@ -19,12 +17,12 @@ a:hover { font-weight: bold } -table.fields { +table.fields { margin-bottom: 0; padding-bottom: 0; } -table.fields td { +table.fields td { vertical-align: top } @@ -52,4 +50,3 @@ The HTML that this stylesheet applies to looks like this:

Custom comments column heading

...
*/ - diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index a0bf58766d..4d8ff5dfe5 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -57,8 +57,6 @@ def css(): global _css if _css is None: val = P('templates/book_details.css', data=True).decode('utf-8') - col = QApplication.instance().palette().color(QPalette.Link).name() - val = val.replace('LINK_COLOR', col) _css = re.sub(unicode_type(r'/\*.*?\*/'), '', val, flags=re.DOTALL) return _css