mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Book details panel: An option to control the layout of the panel in "Narrow" mode (Preferences->Look & feel->Book details)
See #1714613 (Is the description suppose to bleed over to the details panel?)
This commit is contained in:
parent
28965f45ae
commit
110b022a86
@ -156,6 +156,7 @@ def create_defs():
|
||||
defs['qv_dclick_changes_column'] = True
|
||||
defs['qv_retkey_changes_column'] = True
|
||||
defs['qv_follows_column'] = False
|
||||
defs['book_details_narrow_comments_layout'] = 'float'
|
||||
|
||||
|
||||
create_defs()
|
||||
|
@ -133,6 +133,11 @@ def render_html(mi, css, vertical, widget, all_fields=False, render_data_func=No
|
||||
|
||||
if vertical:
|
||||
ans = templ%(table+right_pane)
|
||||
else:
|
||||
if gprefs['book_details_narrow_comments_layout'] == 'columns':
|
||||
ans = templ%(u'<table><tr><td valign="top" '
|
||||
'style="padding-right:2em; width:40%%">%s</td><td valign="top">%s</td></tr></table>'
|
||||
% (table, right_pane))
|
||||
else:
|
||||
ans = templ%(u'<div style="float: left; margin-right: 1em; margin-bottom: 1em; max-width: 40%">{}</div><div>{}</div>'.format(
|
||||
table, right_pane))
|
||||
|
@ -5,7 +5,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import json
|
||||
import json, textwrap
|
||||
|
||||
from collections import defaultdict
|
||||
from threading import Thread
|
||||
@ -403,6 +403,12 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
r('emblem_position', gprefs, choices=[
|
||||
(_('Left'), 'left'), (_('Top'), 'top'), (_('Right'), 'right'), (_('Bottom'), 'bottom')])
|
||||
r('book_list_extra_row_spacing', gprefs)
|
||||
r('book_details_narrow_comments_layout', gprefs, choices=[(_('Float'), 'float'), (_('Columns'), 'columns')])
|
||||
self.opt_book_details_narrow_comments_layout.setToolTip(textwrap.fill(_(
|
||||
'Choose how the text is laid out when using the "Narrow" user interface layout.'
|
||||
' A value of "Float" means that the comments text will wrap around'
|
||||
' the other metadata fields, while a value of "Columns" means that'
|
||||
' the comments will be in a separate fixed width column.')))
|
||||
self.cover_browser_title_template_button.clicked.connect(self.edit_cb_title_template)
|
||||
self.id_links_button.clicked.connect(self.edit_id_link_rules)
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Interface font:</string>
|
||||
<string>&Interface font:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>font_display</cstring>
|
||||
@ -252,7 +252,7 @@
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_hidpi">
|
||||
<property name="text">
|
||||
<string>Adjust for &high resolution screens (needs restart):</string>
|
||||
<string>&Adjust for high resolution screens (needs restart):</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>opt_hidpi</cstring>
|
||||
@ -340,7 +340,7 @@
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>&Spacing between covers:</string>
|
||||
<string>Spac&ing between covers:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>opt_cover_grid_spacing</cstring>
|
||||
@ -703,7 +703,7 @@ A value of zero means calculate automatically.</string>
|
||||
<string>&Book details</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_12">
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Note that <b>comments</b> will always be displayed at the end, regardless of the position you assign here.</string>
|
||||
@ -713,7 +713,7 @@ A value of zero means calculate automatically.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" rowspan="2">
|
||||
<item row="4" column="0" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Select displayed metadata</string>
|
||||
@ -808,7 +808,7 @@ A value of zero means calculate automatically.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="id_links_button">
|
||||
<property name="text">
|
||||
<string>Create rules to convert &identifiers into links</string>
|
||||
@ -825,6 +825,19 @@ A value of zero means calculate automatically.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>How to display text in the 'Narrow' &layout:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>opt_book_details_narrow_comments_layout</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="opt_book_details_narrow_comments_layout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tag_browser_tab">
|
||||
@ -890,7 +903,7 @@ a few top-level elements.</string>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_81">
|
||||
<property name="text">
|
||||
<string>Categories with &hierarchical items:</string>
|
||||
<string>C&ategories with hierarchical items:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>opt_categories_using_hierarchy</cstring>
|
||||
@ -981,7 +994,7 @@ see the counts by hovering your mouse over any item.</string>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>&Spacing between items:</string>
|
||||
<string>Spacing between &items:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>opt_tag_browser_item_padding</cstring>
|
||||
@ -1144,25 +1157,25 @@ them to all have the same width and height</string>
|
||||
<layout class="QGridLayout" name="gridLayout_122">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="opt_qv_respects_vls">
|
||||
<property name="text">
|
||||
<string>&Apply virtual libraries in Quickview panel</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Check this box to make Quickview show books only in the
|
||||
current virtual library. If unchecked, Quickview ignores virtual libraries. If
|
||||
unchecked then only row changes are taken into account.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Apply virtual libraries in Quickview panel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="opt_qv_follows_column">
|
||||
<property name="text">
|
||||
<string>&Change QV item when book list column changes</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Check this box to make Quickview change the column being examined
|
||||
when the column in the book list is changed using the cursor arrow keys</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Change QV item when book list column changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
Loading…
x
Reference in New Issue
Block a user