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