Fix #1982413 [Color Palette setting always disabled](https://bugs.launchpad.net/calibre/+bug/1982413)

This commit is contained in:
Kovid Goyal 2022-07-21 08:11:50 +05:30
parent 35d33fd59b
commit 226f19b440
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -635,7 +635,6 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
self.sections_view.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff) self.sections_view.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.tabWidget.currentWidget().setFocus(Qt.FocusReason.OtherFocusReason) self.tabWidget.currentWidget().setFocus(Qt.FocusReason.OtherFocusReason)
self.opt_ui_style.currentIndexChanged.connect(self.update_color_palette_state) self.opt_ui_style.currentIndexChanged.connect(self.update_color_palette_state)
self.update_color_palette_state()
def update_color_palette_state(self): def update_color_palette_state(self):
if self.ui_style_available: if self.ui_style_available:
@ -752,6 +751,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
self.opt_book_details_css.setPlainText(P('templates/book_details.css', data=True).decode('utf-8')) self.opt_book_details_css.setPlainText(P('templates/book_details.css', data=True).decode('utf-8'))
self.opt_book_details_css.blockSignals(False) self.opt_book_details_css.blockSignals(False)
self.tb_focus_label.setVisible(self.opt_tag_browser_allow_keyboard_focus.isChecked()) self.tb_focus_label.setVisible(self.opt_tag_browser_allow_keyboard_focus.isChecked())
self.update_color_palette_state()
def open_cg_cache(self): def open_cg_cache(self):
open_local_file(self.gui.grid_view.thumbnail_cache.location) open_local_file(self.gui.grid_view.thumbnail_cache.location)