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,7 +1268,19 @@ 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">
<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
@ -1298,17 +1291,7 @@ 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">
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Co&amp;llapse when more items than:</string>
@ -1318,7 +1301,7 @@ if you never want subcategories</string>
</property>
</widget>
</item>
<item row="4" column="1">
<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
@ -1329,7 +1312,7 @@ up into subcategories. If the partition method is set to disable, this value is
</property>
</widget>
</item>
<item row="5" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Combine letters &amp;when fewer items than:</string>
@ -1339,7 +1322,7 @@ up into subcategories. If the partition method is set to disable, this value is
</property>
</widget>
</item>
<item row="5" column="1">
<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
@ -1351,7 +1334,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Spacing between &amp;items:</string>
@ -1361,7 +1344,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</property>
</widget>
</item>
<item row="6" column="1">
<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>
@ -1383,7 +1366,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</property>
</widget>
</item>
<item row="7" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_8111">
<property name="text">
<string>Categories &amp;not to partition:</string>
@ -1393,7 +1376,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="4" column="1">
<widget class="EditWithComplete" name="opt_tag_browser_dont_collapse">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -1410,7 +1393,7 @@ a few top-level elements.</string>
</property>
</widget>
</item>
<item row="8" column="0">
<item row="5" column="0">
<widget class="QLabel" name="label_81">
<property name="text">
<string>C&amp;ategories with hierarchical items:</string>
@ -1420,7 +1403,7 @@ a few top-level elements.</string>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="5" column="1">
<widget class="EditWithComplete" name="opt_categories_using_hierarchy">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -1438,14 +1421,11 @@ then the tags will be displayed each on their own line.</string>
</property>
</widget>
</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>
</layout>
</item>
<item row="10" column="0">
<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>
@ -1455,7 +1435,14 @@ then the tags will be displayed each on their own line.</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="2">
<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
@ -1467,14 +1454,14 @@ see the counts by hovering your mouse over any item.</string>
</property>
</widget>
</item>
<item row="12" column="0" colspan="2">
<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="13" column="0" colspan="2">
<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
@ -1487,7 +1474,7 @@ see the counts by hovering your mouse over any item.</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="2">
<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
@ -1499,7 +1486,9 @@ see the counts by hovering your mouse over any item.</string>
</property>
</widget>
</item>
<item row="15" column="0" colspan="2">
<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
@ -1513,7 +1502,7 @@ using the mouse.&lt;/p&gt;</string>
</property>
</widget>
</item>
<item row="16" column="0" colspan="2">
<item>
<widget class="QLabel" name="tb_focus_label">
<property name="styleSheet">
<string notr="true">margin-left: 1.5em</string>
@ -1527,6 +1516,10 @@ using the mouse.&lt;/p&gt;</string>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</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>