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,7 +1,5 @@
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 {
@ -52,4 +50,3 @@ The HTML that this stylesheet applies to looks like this:
<h3 class="comments-heading">Custom comments column heading</h3>
<div id="_customcolname" class="comments">...</div>
*/

View File

@ -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