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,7 +1268,19 @@ 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>
<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"> <widget class="QComboBox" name="opt_tags_browser_partition_method">
<property name="toolTip"> <property name="toolTip">
<string>Choose how Tag browser subcategories are displayed when <string>Choose how Tag browser subcategories are displayed when
@ -1298,17 +1291,7 @@ 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">
<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"> <widget class="QLabel" name="label_10">
<property name="text"> <property name="text">
<string>Co&amp;llapse when more items than:</string> <string>Co&amp;llapse when more items than:</string>
@ -1318,7 +1301,7 @@ if you never want subcategories</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="1" column="1">
<widget class="QSpinBox" name="opt_tags_browser_collapse_at"> <widget class="QSpinBox" name="opt_tags_browser_collapse_at">
<property name="toolTip"> <property name="toolTip">
<string>If a Tag browser category has more than this number of items, it is divided <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> </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>
@ -1339,7 +1322,7 @@ up into subcategories. If the partition method is set to disable, this value is
</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
@ -1351,7 +1334,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</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>
@ -1361,7 +1344,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</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>
@ -1383,7 +1366,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</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>
@ -1393,7 +1376,7 @@ not set to first letter, this value is ignored. Set to zero to disable.</string>
</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">
@ -1410,7 +1393,7 @@ 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>
@ -1420,7 +1403,7 @@ a few top-level elements.</string>
</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">
@ -1438,14 +1421,11 @@ then the tags will be displayed each on their own line.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0"> </layout>
<widget class="QCheckBox" name="opt_tag_browser_show_tooltips">
<property name="text">
<string>Show &amp;tooltips</string>
</property>
</widget>
</item> </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"> <widget class="QCheckBox" name="opt_show_avg_rating">
<property name="text"> <property name="text">
<string>Show &amp;average ratings</string> <string>Show &amp;average ratings</string>
@ -1455,7 +1435,14 @@ then the tags will be displayed each on their own line.</string>
</property> </property>
</widget> </widget>
</item> </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"> <widget class="QCheckBox" name="opt_tag_browser_show_counts">
<property name="toolTip"> <property name="toolTip">
<string>Show counts for items in the Tag browser. Such as the number of books <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> </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
@ -1487,7 +1474,7 @@ see the counts by hovering your mouse over any item.</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
@ -1499,7 +1486,9 @@ see the counts by hovering your mouse over any item.</string>
</property> </property>
</widget> </widget>
</item> </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"> <widget class="QCheckBox" name="opt_tag_browser_allow_keyboard_focus">
<property name="toolTip"> <property name="toolTip">
<string>&lt;p&gt;When checked, the Tag browser can get keyboard focus, allowing <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> </property>
</widget> </widget>
</item> </item>
<item row="16" column="0" colspan="2"> <item>
<widget class="QLabel" name="tb_focus_label"> <widget class="QLabel" name="tb_focus_label">
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">margin-left: 1.5em</string> <string notr="true">margin-left: 1.5em</string>
@ -1527,6 +1516,10 @@ using the mouse.&lt;/p&gt;</string>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</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>