diff --git a/resources/templates/book_details.css b/resources/templates/book_details.css index a3cda723df..5cabf7dc96 100644 --- a/resources/templates/book_details.css +++ b/resources/templates/book_details.css @@ -1,3 +1,9 @@ +body, td { + background-color: transparent; +} + +body.horizontal table td.title { white-space: nowrap } + a { text-decoration: none; } diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index bf029f767e..1a22001e29 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -9,7 +9,7 @@ from functools import partial from PyQt5.Qt import ( QAction, QApplication, QColor, QEasingCurve, QIcon, QLayout, QMenu, - QMimeData, QPainter, QPalette, QPen, QPixmap, QPropertyAnimation, QRect, QSize, + QMimeData, QPainter, QPen, QPixmap, QPropertyAnimation, QRect, QSize, QSizePolicy, Qt, QUrl, QWidget, pyqtProperty, pyqtSignal ) @@ -99,7 +99,7 @@ def init_manage_action(ac, field, value): return ac -def render_html(mi, css, vertical, widget, all_fields=False, render_data_func=None, pref_name='book_display_fields'): # {{{ +def render_html(mi, vertical, widget, all_fields=False, render_data_func=None, pref_name='book_display_fields'): # {{{ func = render_data_func or render_data try: table, comment_fields = func(mi, all_fields=all_fields, @@ -116,27 +116,14 @@ def render_html(mi, css, vertical, widget, all_fields=False, render_data_func=No ans = unicode_type(col.name()) return ans - c = color_to_string(QApplication.palette().color(QPalette.Normal, - QPalette.WindowText)) templ = '''\ -
- - - - + + %%s - '''%(c, css, 'normal' if vertical else 'nowrap') + '''%('vertical' if vertical else 'horizontal') comments = '' if comment_fields: comments = '\n'.join('