diff --git a/changelog.md b/changelog.md index 4056187..fd2cf3a 100644 --- a/changelog.md +++ b/changelog.md @@ -3,7 +3,7 @@ ## [1.11.0] - date ### Changed -- Update common_utils +- Fix double ScrollArea in config dialog ## [1.10.0] - 2023/04/10 diff --git a/config.py b/config.py index 92870f6..9811ca9 100644 --- a/config.py +++ b/config.py @@ -165,23 +165,23 @@ def __init__(self, plugin_action): QWidget.__init__(self) self.plugin_action = plugin_action - layout = QVBoxLayout(self) + layout = QVBoxLayout() self.setLayout(layout) + if calibre_version < (6,26,0): + # Make dialog box scrollable (for smaller screens) + scrollable = QScrollArea() + scrollcontent = QWidget() + scrollable.setWidget(scrollcontent) + scrollable.setWidgetResizable(True) + layout.addWidget(scrollable) + + layout = QVBoxLayout() + scrollcontent.setLayout(layout) + title_layout = ImageTitleLayout(self, PLUGIN_ICON, _('Comments Cleaner Options')) layout.addLayout(title_layout) - # Make dialog box scrollable (for smaller screens) - scrollable = QScrollArea() - scrollcontent = QWidget() - scrollable.setWidget(scrollcontent) - scrollable.setWidgetResizable(True) - layout.addWidget(scrollable) - - layout = QVBoxLayout() - scrollcontent.setLayout(layout) - - # --- options HTML --- optionsHTML_GroupBox = QGroupBox(' ', self) layout.addWidget(optionsHTML_GroupBox)