Make the tag browser preferences a little nicer

Give the categories list a min height and layout the checkbox
preferences horizontally as well as vertically
This commit is contained in:
Kovid Goyal 2022-08-24 20:27:31 +05:30
parent fae1682ed8
commit dc28b56b70
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -7,36 +7,14 @@
<x>0</x>
<y>0</y>
<width>1083</width>
<height>594</height>
<height>791</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QListWidget" name="sections_view">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="ScrollingTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
@ -1171,18 +1149,15 @@ using the Tab key. The F2 (Edit) key will still open the template editor.&lt;/p&
<attribute name="title">
<string>&amp;Tag browser</string>
</attribute>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="1" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Select the categories to display in the Tag browser and their order</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QLabel">
<widget class="QLabel" name="label">
<property name="text">
<string>User categories and Saved searches cannot be moved</string>
</property>
@ -1225,6 +1200,12 @@ using the Tab key. The F2 (Edit) key will still open the template editor.&lt;/p&
</item>
<item row="2" column="0" rowspan="3">
<widget class="QListView" name="tb_display_order">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
@ -1287,246 +1268,258 @@ structure and you want to use the same column order for each one.&lt;/p&gt;</str
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="opt_tags_browser_partition_method">
<property name="toolTip">
<string>Choose how Tag browser subcategories are displayed when
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>&amp;Category partitioning method:</string>
</property>
<property name="buddy">
<cstring>opt_tags_browser_partition_method</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="opt_tags_browser_partition_method">
<property name="toolTip">
<string>Choose how Tag browser subcategories are displayed when
there are more items than the limit. Select by first
letter to see an A, B, C list. Choose partitioned to
have a list of fixed-sized groups. Set to disabled
if you never want subcategories</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>&amp;Category partitioning method:</string>
</property>
<property name="buddy">
<cstring>opt_tags_browser_partition_method</cstring>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Co&amp;llapse when more items than:</string>
</property>
<property name="buddy">
<cstring>opt_tags_browser_collapse_at</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="opt_tags_browser_collapse_at">
<property name="toolTip">
<string>If a Tag browser category has more than this number of items, it is divided
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Co&amp;llapse when more items than:</string>
</property>
<property name="buddy">
<cstring>opt_tags_browser_collapse_at</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="opt_tags_browser_collapse_at">
<property name="toolTip">
<string>If a Tag browser category has more than this number of items, it is divided
up into subcategories. If the partition method is set to disable, this value is ignored.</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Combine letters &amp;when fewer items than:</string>
</property>
<property name="buddy">
<cstring>opt_tags_browser_collapse_fl_at</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="opt_tags_browser_collapse_fl_at">
<property name="toolTip">
<string>If collapsing by first letter, combine adjacent letters together if
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Combine letters &amp;when fewer items than:</string>
</property>
<property name="buddy">
<cstring>opt_tags_browser_collapse_fl_at</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="opt_tags_browser_collapse_fl_at">
<property name="toolTip">
<string>If collapsing by first letter, combine adjacent letters together if
there are fewer items under a letter than specified here. If the partition method is
not set to first letter, this value is ignored. Set to zero to disable.</string>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Spacing between &amp;items:</string>
</property>
<property name="buddy">
<cstring>opt_tag_browser_item_padding</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="opt_tag_browser_item_padding">
<property name="toolTip">
<string>The spacing between consecutive items in the Tag browser. In units of (ex) which is the approximate height of the letter 'x' in the currently used font. </string>
</property>
<property name="suffix">
<string> ex</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-1.000000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8111">
<property name="text">
<string>Categories &amp;not to partition:</string>
</property>
<property name="buddy">
<cstring>opt_tag_browser_dont_collapse</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="EditWithComplete" name="opt_tag_browser_dont_collapse">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>A comma-separated list of categories that are not to
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Spacing between &amp;items:</string>
</property>
<property name="buddy">
<cstring>opt_tag_browser_item_padding</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="opt_tag_browser_item_padding">
<property name="toolTip">
<string>The spacing between consecutive items in the Tag browser. In units of (ex) which is the approximate height of the letter 'x' in the currently used font. </string>
</property>
<property name="suffix">
<string> ex</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-1.000000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_8111">
<property name="text">
<string>Categories &amp;not to partition:</string>
</property>
<property name="buddy">
<cstring>opt_tag_browser_dont_collapse</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="EditWithComplete" name="opt_tag_browser_dont_collapse">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>A comma-separated list of categories that are not to
be partitioned even if the number of items is larger than
the value shown above. This option can be used to
avoid collapsing hierarchical categories that have only
a few top-level elements.</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_81">
<property name="text">
<string>C&amp;ategories with hierarchical items:</string>
</property>
<property name="buddy">
<cstring>opt_categories_using_hierarchy</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="EditWithComplete" name="opt_categories_using_hierarchy">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>A comma-separated list of categories in which items containing
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_81">
<property name="text">
<string>C&amp;ategories with hierarchical items:</string>
</property>
<property name="buddy">
<cstring>opt_categories_using_hierarchy</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="EditWithComplete" name="opt_categories_using_hierarchy">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>A comma-separated list of categories in which items containing
periods are displayed in the Tag browser trees. For example, if
this box contains 'tags' then tags of the form 'Mystery.English'
and 'Mystery.Thriller' will be displayed with English and Thriller
both under 'Mystery'. If 'tags' is not in this box,
then the tags will be displayed each on their own line.</string>
</property>
</widget>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="opt_tag_browser_show_tooltips">
<property name="text">
<string>Show &amp;tooltips</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="opt_show_avg_rating">
<property name="text">
<string>Show &amp;average ratings</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="11" column="0" colspan="2">
<widget class="QCheckBox" name="opt_tag_browser_show_counts">
<property name="toolTip">
<string>Show counts for items in the Tag browser. Such as the number of books
<item>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<widget class="QCheckBox" name="opt_show_avg_rating">
<property name="text">
<string>Show &amp;average ratings</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="opt_tag_browser_show_tooltips">
<property name="text">
<string>Show &amp;tooltips</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="opt_tag_browser_show_counts">
<property name="toolTip">
<string>Show counts for items in the Tag browser. Such as the number of books
by each author, the number of authors, etc. If you turn it off, you can still
see the counts by hovering your mouse over any item.</string>
</property>
<property name="text">
<string>Show &amp;counts</string>
</property>
</widget>
</item>
<item row="12" column="0" colspan="2">
<widget class="QCheckBox" name="opt_tag_browser_old_look">
<property name="text">
<string>Use &amp;alternating row colors</string>
</property>
</widget>
</item>
<item row="13" column="0" colspan="2">
<widget class="QCheckBox" name="opt_tag_browser_hide_empty_categories">
<property name="toolTip">
<string>When checked, calibre will automatically hide any category
</property>
<property name="text">
<string>Show &amp;counts</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="opt_tag_browser_old_look">
<property name="text">
<string>Use &amp;alternating row colors</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="opt_tag_browser_hide_empty_categories">
<property name="toolTip">
<string>When checked, calibre will automatically hide any category
(a column, custom or standard) that has no items to show. For example, some
categories might not have values when using Virtual libraries. Checking this
box will cause these empty categories to be hidden.</string>
</property>
<property name="text">
<string>Hi&amp;de empty categories (columns)</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="2">
<widget class="QCheckBox" name="opt_tag_browser_always_autocollapse">
<property name="toolTip">
<string>When checked, Find in the Tag browser will show all items
</property>
<property name="text">
<string>Hi&amp;de empty categories (columns)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="opt_tag_browser_always_autocollapse">
<property name="toolTip">
<string>When checked, Find in the Tag browser will show all items
that match the search instead of the first one. If Hide empty categories is
also checked then only categories containing a matched item will be shown.</string>
</property>
<property name="text">
<string>Find &amp;shows all items that match</string>
</property>
</widget>
</item>
<item row="15" column="0" colspan="2">
<widget class="QCheckBox" name="opt_tag_browser_allow_keyboard_focus">
<property name="toolTip">
<string>&lt;p&gt;When checked, the Tag browser can get keyboard focus, allowing
</property>
<property name="text">
<string>Find &amp;shows all items that match</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="opt_tag_browser_allow_keyboard_focus">
<property name="toolTip">
<string>&lt;p&gt;When checked, the Tag browser can get keyboard focus, allowing
use of the keyboard to navigate the tree using the arrow keys. The Enter key simulates
a click on the selected item. The keyboard shortcut 'Tag browser /
Give the Tag browser keyboard focus' changes the keyboard focus without
using the mouse.&lt;/p&gt;</string>
</property>
<property name="text">
<string>Allow the Tag browser to have keyboard &amp;focus</string>
</property>
</widget>
</property>
<property name="text">
<string>Allow the Tag browser to have keyboard &amp;focus</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="tb_focus_label">
<property name="styleSheet">
<string notr="true">margin-left: 1.5em</string>
</property>
<property name="text">
<string>&lt;p style=&quot;text-indent: 2em; font-size:smaller&quot;&gt;If you enable this option then you should set a keyboard shortcut to focus the Tag browser under &lt;code&gt;Preferences-&amp;gt;Shortcuts-&amp;gt;Tag browser-&amp;gt;Give the Tag browser keyboard focus&lt;/code&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="16" column="0" colspan="2">
<widget class="QLabel" name="tb_focus_label">
<property name="styleSheet">
<string notr="true">margin-left: 1.5em</string>
</property>
<property name="text">
<string>&lt;p style=&quot;text-indent: 2em; font-size:smaller&quot;&gt;If you enable this option then you should set a keyboard shortcut to focus the Tag browser under &lt;code&gt;Preferences-&amp;gt;Shortcuts-&amp;gt;Tag browser-&amp;gt;Give the Tag browser keyboard focus&lt;/code&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</layout>
</widget>
<widget class="QWidget" name="cover_browser_tab">
<attribute name="icon">
@ -1793,6 +1786,16 @@ column being examined (the left-hand pane)</string>
</widget>
</widget>
</item>
<item row="0" column="0">
<widget class="QListWidget" name="sections_view">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>