QTextBrowser should not require explicit link color override

This commit is contained in:
Kovid Goyal 2019-09-10 15:28:55 +05:30
parent f069848639
commit 9c0346bbb1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 9 deletions

View File

@ -1,14 +1,12 @@
a { a {
text-decoration: none; text-decoration: none;
/* LINK_COLOR below will be replaced with the link color defined by the current color theme */
color: LINK_COLOR
} }
a:hover { a:hover {
color: red color: red
} }
.comments { .comments {
margin-top: 0; margin-top: 0;
padding-top: 0; padding-top: 0;
text-indent: 0 text-indent: 0
@ -19,12 +17,12 @@ a:hover {
font-weight: bold font-weight: bold
} }
table.fields { table.fields {
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 0; padding-bottom: 0;
} }
table.fields td { table.fields td {
vertical-align: top vertical-align: top
} }
@ -52,4 +50,3 @@ The HTML that this stylesheet applies to looks like this:
<h3 class="comments-heading">Custom comments column heading</h3> <h3 class="comments-heading">Custom comments column heading</h3>
<div id="_customcolname" class="comments">...</div> <div id="_customcolname" class="comments">...</div>
*/ */

View File

@ -57,8 +57,6 @@ def css():
global _css global _css
if _css is None: if _css is None:
val = P('templates/book_details.css', data=True).decode('utf-8') 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) _css = re.sub(unicode_type(r'/\*.*?\*/'), '', val, flags=re.DOTALL)
return _css return _css