# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/preferences/look_feel_tabs/bookshelf_view.ui'
#
# Created by: PyQt6 UI code generator 6.10.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_bookshelf_tab(object):
    def setupUi(self, bookshelf_tab):
        bookshelf_tab.setObjectName("bookshelf_tab")
        bookshelf_tab.resize(626, 521)
        self.bookshelf_view_tab = QtWidgets.QWidget()
        self.bookshelf_view_tab.setObjectName("bookshelf_view_tab")
        self.formLayout_3 = QtWidgets.QFormLayout(self.bookshelf_view_tab)
        self.formLayout_3.setFieldGrowthPolicy(QtWidgets.QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow)
        self.formLayout_3.setObjectName("formLayout_3")
        self.label = QtWidgets.QLabel(parent=self.bookshelf_view_tab)
        self.label.setObjectName("label")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label)
        self.opt_bookshelf_height = QtWidgets.QSpinBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_height.setMinimum(119)
        self.opt_bookshelf_height.setMaximum(1200)
        self.opt_bookshelf_height.setObjectName("opt_bookshelf_height")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.opt_bookshelf_height)
        self.label_variable_height = QtWidgets.QLabel(parent=self.bookshelf_view_tab)
        self.label_variable_height.setObjectName("label_variable_height")
        self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_variable_height)
        self.opt_bookshelf_variable_height = QtWidgets.QComboBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_variable_height.setObjectName("opt_bookshelf_variable_height")
        self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.opt_bookshelf_variable_height)
        self.label_fade_time = QtWidgets.QLabel(parent=self.bookshelf_view_tab)
        self.label_fade_time.setObjectName("label_fade_time")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_fade_time)
        self.opt_bookshelf_fade_time = QtWidgets.QSpinBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_fade_time.setMaximum(2000)
        self.opt_bookshelf_fade_time.setSingleStep(100)
        self.opt_bookshelf_fade_time.setProperty("value", 200)
        self.opt_bookshelf_fade_time.setObjectName("opt_bookshelf_fade_time")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.opt_bookshelf_fade_time)
        self.label_hover_interact = QtWidgets.QLabel(parent=self.bookshelf_view_tab)
        self.label_hover_interact.setObjectName("label_hover_interact")
        self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_hover_interact)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.opt_bookshelf_hover = QtWidgets.QComboBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_hover.setObjectName("opt_bookshelf_hover")
        self.horizontalLayout_6.addWidget(self.opt_bookshelf_hover)
        self.opt_bookshelf_shadow = QtWidgets.QCheckBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_shadow.setObjectName("opt_bookshelf_shadow")
        self.horizontalLayout_6.addWidget(self.opt_bookshelf_shadow)
        self.formLayout_3.setLayout(5, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_6)
        self.label_4 = QtWidgets.QLabel(parent=self.bookshelf_view_tab)
        self.label_4.setObjectName("label_4")
        self.formLayout_3.setWidget(7, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_4)
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.opt_bookshelf_divider_style = QtWidgets.QComboBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_divider_style.setObjectName("opt_bookshelf_divider_style")
        self.horizontalLayout_8.addWidget(self.opt_bookshelf_divider_style)
        self.opt_bookshelf_divider_text_right = QtWidgets.QCheckBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_divider_text_right.setObjectName("opt_bookshelf_divider_text_right")
        self.horizontalLayout_8.addWidget(self.opt_bookshelf_divider_text_right)
        self.opt_bookshelf_start_with_divider = QtWidgets.QCheckBox(parent=self.bookshelf_view_tab)
        self.opt_bookshelf_start_with_divider.setObjectName("opt_bookshelf_start_with_divider")
        self.horizontalLayout_8.addWidget(self.opt_bookshelf_start_with_divider)
        self.formLayout_3.setLayout(7, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_8)
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.recount_button = QtWidgets.QPushButton(parent=self.bookshelf_view_tab)
        self.recount_button.setObjectName("recount_button")
        self.horizontalLayout_7.addWidget(self.recount_button)
        self.show_log_button = QtWidgets.QPushButton(parent=self.bookshelf_view_tab)
        self.show_log_button.setObjectName("show_log_button")
        self.horizontalLayout_7.addWidget(self.show_log_button)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout_7.addItem(spacerItem)
        self.formLayout_3.setLayout(9, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.horizontalLayout_7)
        spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.formLayout_3.setItem(10, QtWidgets.QFormLayout.ItemRole.LabelRole, spacerItem1)
        self.groupBox = QtWidgets.QGroupBox(parent=self.bookshelf_view_tab)
        self.groupBox.setObjectName("groupBox")
        self.formLayout = QtWidgets.QFormLayout(self.groupBox)
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.label_bookshelf_thumbnail = QtWidgets.QLabel(parent=self.groupBox)
        self.label_bookshelf_thumbnail.setObjectName("label_bookshelf_thumbnail")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_bookshelf_thumbnail)
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
        self.opt_bookshelf_thumbnail = QtWidgets.QComboBox(parent=self.groupBox)
        self.opt_bookshelf_thumbnail.setToolTip("")
        self.opt_bookshelf_thumbnail.setObjectName("opt_bookshelf_thumbnail")
        self.horizontalLayout_10.addWidget(self.opt_bookshelf_thumbnail)
        self.label_6 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_6.setObjectName("label_6")
        self.horizontalLayout_10.addWidget(self.label_6)
        self.opt_bookshelf_thumbnail_opacity = QtWidgets.QSpinBox(parent=self.groupBox)
        self.opt_bookshelf_thumbnail_opacity.setMinimum(0)
        self.opt_bookshelf_thumbnail_opacity.setMaximum(100)
        self.opt_bookshelf_thumbnail_opacity.setProperty("value", 30)
        self.opt_bookshelf_thumbnail_opacity.setObjectName("opt_bookshelf_thumbnail_opacity")
        self.horizontalLayout_10.addWidget(self.opt_bookshelf_thumbnail_opacity)
        self.formLayout.setLayout(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_10)
        self.label_title = QtWidgets.QLabel(parent=self.groupBox)
        self.label_title.setObjectName("label_title")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_title)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.opt_bookshelf_title_template = QtWidgets.QLineEdit(parent=self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.opt_bookshelf_title_template.sizePolicy().hasHeightForWidth())
        self.opt_bookshelf_title_template.setSizePolicy(sizePolicy)
        self.opt_bookshelf_title_template.setClearButtonEnabled(True)
        self.opt_bookshelf_title_template.setObjectName("opt_bookshelf_title_template")
        self.horizontalLayout_2.addWidget(self.opt_bookshelf_title_template)
        self.template_title_button = QtWidgets.QPushButton(parent=self.groupBox)
        self.template_title_button.setObjectName("template_title_button")
        self.horizontalLayout_2.addWidget(self.template_title_button)
        self.formLayout.setLayout(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_2)
        self.label_2 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_2)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.opt_bookshelf_author_template = QtWidgets.QLineEdit(parent=self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
        sizePolicy.setHorizontalStretch(10)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.opt_bookshelf_author_template.sizePolicy().hasHeightForWidth())
        self.opt_bookshelf_author_template.setSizePolicy(sizePolicy)
        self.opt_bookshelf_author_template.setClearButtonEnabled(True)
        self.opt_bookshelf_author_template.setObjectName("opt_bookshelf_author_template")
        self.horizontalLayout_4.addWidget(self.opt_bookshelf_author_template)
        self.template_author_button = QtWidgets.QPushButton(parent=self.groupBox)
        self.template_author_button.setObjectName("template_author_button")
        self.horizontalLayout_4.addWidget(self.template_author_button)
        self.formLayout.setLayout(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_4)
        self.label_pages = QtWidgets.QLabel(parent=self.groupBox)
        self.label_pages.setObjectName("label_pages")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_pages)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.opt_bookshelf_spine_size_template = QtWidgets.QLineEdit(parent=self.groupBox)
        self.opt_bookshelf_spine_size_template.setToolTip("")
        self.opt_bookshelf_spine_size_template.setClearButtonEnabled(True)
        self.opt_bookshelf_spine_size_template.setObjectName("opt_bookshelf_spine_size_template")
        self.horizontalLayout_3.addWidget(self.opt_bookshelf_spine_size_template)
        self.template_pages_button = QtWidgets.QPushButton(parent=self.groupBox)
        self.template_pages_button.setObjectName("template_pages_button")
        self.horizontalLayout_3.addWidget(self.template_pages_button)
        self.use_pages_button = QtWidgets.QPushButton(parent=self.groupBox)
        self.use_pages_button.setObjectName("use_pages_button")
        self.horizontalLayout_3.addWidget(self.use_pages_button)
        self.formLayout.setLayout(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_3)
        self.label_10 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_10.setObjectName("label_10")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_10)
        self.label_3 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3)
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.label_7 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_7.setObjectName("label_7")
        self.horizontalLayout_9.addWidget(self.label_7)
        self.opt_bookshelf_min_font_multiplier = QtWidgets.QDoubleSpinBox(parent=self.groupBox)
        self.opt_bookshelf_min_font_multiplier.setDecimals(2)
        self.opt_bookshelf_min_font_multiplier.setMinimum(0.1)
        self.opt_bookshelf_min_font_multiplier.setMaximum(1.0)
        self.opt_bookshelf_min_font_multiplier.setSingleStep(0.1)
        self.opt_bookshelf_min_font_multiplier.setObjectName("opt_bookshelf_min_font_multiplier")
        self.horizontalLayout_9.addWidget(self.opt_bookshelf_min_font_multiplier)
        self.label_8 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_8.setObjectName("label_8")
        self.horizontalLayout_9.addWidget(self.label_8)
        self.opt_bookshelf_max_font_multiplier = QtWidgets.QDoubleSpinBox(parent=self.groupBox)
        self.opt_bookshelf_max_font_multiplier.setMinimum(1.0)
        self.opt_bookshelf_max_font_multiplier.setMaximum(3.0)
        self.opt_bookshelf_max_font_multiplier.setSingleStep(0.1)
        self.opt_bookshelf_max_font_multiplier.setObjectName("opt_bookshelf_max_font_multiplier")
        self.horizontalLayout_9.addWidget(self.opt_bookshelf_max_font_multiplier)
        self.label_9 = QtWidgets.QLabel(parent=self.groupBox)
        self.label_9.setObjectName("label_9")
        self.horizontalLayout_9.addWidget(self.label_9)
        self.opt_bookshelf_outline_width = QtWidgets.QDoubleSpinBox(parent=self.groupBox)
        self.opt_bookshelf_outline_width.setDecimals(1)
        self.opt_bookshelf_outline_width.setMaximum(3.0)
        self.opt_bookshelf_outline_width.setSingleStep(0.1)
        self.opt_bookshelf_outline_width.setObjectName("opt_bookshelf_outline_width")
        self.horizontalLayout_9.addWidget(self.opt_bookshelf_outline_width)
        self.formLayout.setLayout(5, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_9)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.opt_bookshelf_up_to_down = QtWidgets.QCheckBox(parent=self.groupBox)
        self.opt_bookshelf_up_to_down.setObjectName("opt_bookshelf_up_to_down")
        self.horizontalLayout.addWidget(self.opt_bookshelf_up_to_down)
        self.opt_bookshelf_make_space_for_second_line = QtWidgets.QCheckBox(parent=self.groupBox)
        self.opt_bookshelf_make_space_for_second_line.setObjectName("opt_bookshelf_make_space_for_second_line")
        self.horizontalLayout.addWidget(self.opt_bookshelf_make_space_for_second_line)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.formLayout.setLayout(7, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.horizontalLayout)
        self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_14.setObjectName("horizontalLayout_14")
        self.bookshelf_font_display = QtWidgets.QLineEdit(parent=self.groupBox)
        self.bookshelf_font_display.setReadOnly(True)
        self.bookshelf_font_display.setObjectName("bookshelf_font_display")
        self.horizontalLayout_14.addWidget(self.bookshelf_font_display)
        self.change_font_button = QtWidgets.QPushButton(parent=self.groupBox)
        self.change_font_button.setObjectName("change_font_button")
        self.horizontalLayout_14.addWidget(self.change_font_button)
        self.restore_default_font_button = QtWidgets.QPushButton(parent=self.groupBox)
        icon = QtGui.QIcon.ic("clear_left.png")
        self.restore_default_font_button.setIcon(icon)
        self.restore_default_font_button.setObjectName("restore_default_font_button")
        self.horizontalLayout_14.addWidget(self.restore_default_font_button)
        self.formLayout.setLayout(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.horizontalLayout_14)
        self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.groupBox)
        bookshelf_tab.addTab(self.bookshelf_view_tab, "")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.formLayout_2 = QtWidgets.QFormLayout(self.tab)
        self.formLayout_2.setObjectName("formLayout_2")
        self.label_5 = QtWidgets.QLabel(parent=self.tab)
        self.label_5.setObjectName("label_5")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_5)
        self.opt_bookshelf_theme_override = QtWidgets.QComboBox(parent=self.tab)
        self.opt_bookshelf_theme_override.setObjectName("opt_bookshelf_theme_override")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.opt_bookshelf_theme_override)
        self.opt_bookshelf_use_custom_background = QtWidgets.QCheckBox(parent=self.tab)
        self.opt_bookshelf_use_custom_background.setObjectName("opt_bookshelf_use_custom_background")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.opt_bookshelf_use_custom_background)
        self.background_box = BackgroundConfig(parent=self.tab)
        self.background_box.setObjectName("background_box")
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.background_box)
        self.opt_bookshelf_use_custom_colors = QtWidgets.QGroupBox(parent=self.tab)
        self.opt_bookshelf_use_custom_colors.setCheckable(True)
        self.opt_bookshelf_use_custom_colors.setChecked(False)
        self.opt_bookshelf_use_custom_colors.setObjectName("opt_bookshelf_use_custom_colors")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.opt_bookshelf_use_custom_colors)
        self.verticalLayout.setObjectName("verticalLayout")
        self.bookshelf_tab = QtWidgets.QTabWidget(parent=self.opt_bookshelf_use_custom_colors)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.bookshelf_tab.sizePolicy().hasHeightForWidth())
        self.bookshelf_tab.setSizePolicy(sizePolicy)
        self.bookshelf_tab.setObjectName("bookshelf_tab")
        self.widget_1 = QtWidgets.QWidget()
        self.widget_1.setObjectName("widget_1")
        self.custom_colors_light_layout = QtWidgets.QFormLayout(self.widget_1)
        self.custom_colors_light_layout.setObjectName("custom_colors_light_layout")
        self.bookshelf_tab.addTab(self.widget_1, "")
        self.widget_2 = QtWidgets.QWidget()
        self.widget_2.setObjectName("widget_2")
        self.custom_colors_dark_layout = QtWidgets.QFormLayout(self.widget_2)
        self.custom_colors_dark_layout.setObjectName("custom_colors_dark_layout")
        self.bookshelf_tab.addTab(self.widget_2, "")
        self.verticalLayout.addWidget(self.bookshelf_tab)
        self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_11.setObjectName("horizontalLayout_11")
        self.restore_defaults_colors_button = QtWidgets.QPushButton(parent=self.opt_bookshelf_use_custom_colors)
        self.restore_defaults_colors_button.setIcon(icon)
        self.restore_defaults_colors_button.setObjectName("restore_defaults_colors_button")
        self.horizontalLayout_11.addWidget(self.restore_defaults_colors_button)
        spacerItem3 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
        self.horizontalLayout_11.addItem(spacerItem3)
        self.verticalLayout.addLayout(self.horizontalLayout_11)
        self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.opt_bookshelf_use_custom_colors)
        bookshelf_tab.addTab(self.tab, "")
        self.opt_bookshelf_icon_rules = EditRulesWidget()
        self.opt_bookshelf_icon_rules.setObjectName("opt_bookshelf_icon_rules")
        bookshelf_tab.addTab(self.opt_bookshelf_icon_rules, "")
        self.config_cache = CoverCacheConfig()
        self.config_cache.setObjectName("config_cache")
        bookshelf_tab.addTab(self.config_cache, "")
        self.label.setBuddy(self.opt_bookshelf_height)
        self.label_variable_height.setBuddy(self.opt_bookshelf_variable_height)
        self.label_fade_time.setBuddy(self.opt_bookshelf_fade_time)
        self.label_hover_interact.setBuddy(self.opt_bookshelf_hover)
        self.label_4.setBuddy(self.opt_bookshelf_divider_style)
        self.label_bookshelf_thumbnail.setBuddy(self.opt_bookshelf_thumbnail)
        self.label_6.setBuddy(self.opt_bookshelf_thumbnail_opacity)
        self.label_title.setBuddy(self.opt_bookshelf_title_template)
        self.label_2.setBuddy(self.opt_bookshelf_author_template)
        self.label_pages.setBuddy(self.opt_bookshelf_spine_size_template)
        self.label_10.setBuddy(self.bookshelf_font_display)
        self.label_3.setBuddy(self.opt_bookshelf_min_font_multiplier)
        self.label_7.setBuddy(self.opt_bookshelf_min_font_multiplier)
        self.label_8.setBuddy(self.opt_bookshelf_max_font_multiplier)
        self.label_9.setBuddy(self.opt_bookshelf_outline_width)
        self.label_5.setBuddy(self.opt_bookshelf_theme_override)

        self.retranslateUi(bookshelf_tab)
        bookshelf_tab.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(bookshelf_tab)

    def retranslateUi(self, bookshelf_tab):

        self.label.setText(_("Shelf &height:"))
        self.opt_bookshelf_height.setToolTip(_("Control the height of the book shelves, in pixels. The default is to choose a height automatically based on the size of the screen. Note that if you change the height, the cover thumbnail cache will need to be re-populated so scrolling might be a little slow to start with."))
        self.opt_bookshelf_height.setSpecialValueText(_("Automatic"))
        self.opt_bookshelf_height.setSuffix(_(" px"))
        self.label_variable_height.setText(_("Book &height variation:"))
        self.opt_bookshelf_variable_height.setToolTip(_("Control how the height of book spines varies on the shelf. \"Constant\" makes all books the same height. \"Constant per group\" makes all books in the same group the same height. \"Variable\" gives each book a unique height."))
        self.label_fade_time.setText(_("Duration of hover &animation:"))
        self.opt_bookshelf_fade_time.setSpecialValueText(_("Disable"))
        self.opt_bookshelf_fade_time.setSuffix(_(" milliseconds"))
        self.label_hover_interact.setText(_("&Expand the hovered cover:"))
        self.opt_bookshelf_hover.setToolTip(_("Control what happens when the mouse hovers over the spine of a book."))
        self.opt_bookshelf_shadow.setText(_("Show &shadow for hovered cover"))
        self.label_4.setText(_("Group divider &style:"))
        self.opt_bookshelf_divider_style.setToolTip(_("Control the style to use for the group divider"))
        self.opt_bookshelf_divider_text_right.setToolTip(_("Control whether the text of the group divider is aligned to the right or left"))
        self.opt_bookshelf_divider_text_right.setText(_("Text &aligned to the right"))
        self.opt_bookshelf_start_with_divider.setToolTip(_("When grouping books and a group extends to more than one shelf, place a group divider at the beginning of the additional shelves"))
        self.opt_bookshelf_start_with_divider.setText(_("&Start shelves with divider"))
        self.recount_button.setToolTip(_("Have calibre re-count the pages in all books in the current library."))
        self.recount_button.setText(_("&Recount pages"))
        self.show_log_button.setText(_("Show count &failure log"))
        self.groupBox.setTitle(_("Book spine"))
        self.label_bookshelf_thumbnail.setText(_("Show &cover:"))
        self.label_6.setText(_("&Opacity:"))
        self.opt_bookshelf_thumbnail_opacity.setToolTip(_("<p>How much to blend the cover into the spine. Higher values decrease blending."))
        self.opt_bookshelf_thumbnail_opacity.setSuffix(_(" %"))
        self.label_title.setText(_("Template for &first line:"))
        self.opt_bookshelf_title_template.setToolTip(_("<p>The template used to generate the main text on the spine. This template uses the same syntax as save templates. Defaults to just the book title. Note that this setting is per-library, which means that you have to set it again for every different calibre library you use.\n"
"<p>For example, if you want the first line to be the book title in upper case, you can use the template: <code>{title:uppercase()}</code>"))
        self.template_title_button.setText(_("Template &editor"))
        self.label_2.setText(_("Template for &second line:"))
        self.opt_bookshelf_author_template.setToolTip(_("<p>The template used to generate an optional second line of text on the spine. This template uses the same syntax as save templates. Defaults to no second line. For example, use the value {authors} to show the book authors. Note that this setting is per-library, which means that you have to set it again for every different calibre library you use.</p>"))
        self.template_author_button.setText(_("Template &editor"))
        self.label_pages.setText(_("Template for &width:"))
        self.template_pages_button.setText(_("Template &editor"))
        self.use_pages_button.setText(_("Use a custom &pages column"))
        self.label_10.setText(_("&Font:"))
        self.label_3.setText(_("&Font size:"))
        self.label_7.setText(_("&Minimum:"))
        self.opt_bookshelf_min_font_multiplier.setToolTip(_("The minimum font size for text on the spine. It is a fraction of the base font size."))
        self.label_8.setText(_("Ma&ximum:"))
        self.opt_bookshelf_max_font_multiplier.setToolTip(_("The maximum font size for text on the spine. It is a multiple of the base font size."))
        self.label_9.setText(_("&Outline"))
        self.opt_bookshelf_outline_width.setToolTip(_("<p>Set the thickness, in pixels, of the outline (border) around text on the spine. A value of zero means no outline. An outline helps the text standout against the spine, especially when the spine has a colorful cover."))
        self.opt_bookshelf_outline_width.setSpecialValueText(_("none"))
        self.opt_bookshelf_outline_width.setSuffix(_(" px"))
        self.opt_bookshelf_up_to_down.setToolTip(_("Control whether the text shown on book spines goes upwards or downwards"))
        self.opt_bookshelf_up_to_down.setText(_("Spine text &downwards"))
        self.opt_bookshelf_make_space_for_second_line.setToolTip(_("<p>When showing a second line in the spine, for very narrow books, artificially widen the book to make space for the second line. Without this, the second line will not be displayed for narrow books, with it, narrow books will appear artificially wider than they really are."))
        self.opt_bookshelf_make_space_for_second_line.setText(_("Make &space for second line"))
        self.bookshelf_font_display.setPlaceholderText(_("Use default font"))
        self.change_font_button.setText(_("&Change"))
        self.restore_default_font_button.setText(_("Restore &default"))
        bookshelf_tab.setTabText(bookshelf_tab.indexOf(self.bookshelf_view_tab), _("&Layout"))
        self.label_5.setText(_("&Dark/light:"))
        self.opt_bookshelf_theme_override.setToolTip(_("Control the color theme to use for the bookshelf view"))
        self.opt_bookshelf_use_custom_background.setToolTip(_("Use a custom background, either color or image"))
        self.opt_bookshelf_use_custom_background.setText(_("Use a custom &background"))
        self.opt_bookshelf_use_custom_colors.setTitle(_("Use customs &colors"))
        self.bookshelf_tab.setTabText(self.bookshelf_tab.indexOf(self.widget_1), _("&Light mode"))
        self.bookshelf_tab.setTabText(self.bookshelf_tab.indexOf(self.widget_2), _("&Dark mode"))
        self.restore_defaults_colors_button.setText(_("Restore &defaults"))
        bookshelf_tab.setTabText(bookshelf_tab.indexOf(self.tab), _("&Colors"))
        bookshelf_tab.setTabText(bookshelf_tab.indexOf(self.opt_bookshelf_icon_rules), _("&Emblems"))
        bookshelf_tab.setTabText(bookshelf_tab.indexOf(self.config_cache), _("&Performance"))
from calibre.gui2.preferences.look_feel_tabs import BackgroundConfig, CoverCacheConfig, EditRulesWidget
