diff --git a/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.py b/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.py index 5659b49017..5c6ad8d652 100644 --- a/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.py +++ b/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.py @@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en' from threading import Thread -from qt.core import QBrush, QColor, QColorDialog, QDialog, QPainter, QPixmap, QPushButton, QSize, QSizePolicy, Qt, QVBoxLayout, QWidget, pyqtSignal +from qt.core import QBrush, QColor, QColorDialog, QDialog, QPainter, QPixmap, QPushButton, QSize, QSizePolicy, Qt, QTabWidget, QVBoxLayout, QWidget, pyqtSignal from calibre import human_readable from calibre.gui2 import gprefs, open_local_file, question_dialog @@ -54,10 +54,15 @@ class Background(QWidget): painter.end() -class CoverGridTab(LazyConfigWidgetBase, Ui_Form): +class CoverGridTab(QTabWidget, LazyConfigWidgetBase, Ui_Form): + changed_signal = pyqtSignal() + restart_now = pyqtSignal() size_calculated = pyqtSignal(object) + def __init__(self, parent=None): + super().__init__(parent) + def genesis(self, gui): self.gui = gui db = self.gui.library_view.model().db diff --git a/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.ui b/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.ui index e54851c90a..8e3a45e522 100644 --- a/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.ui +++ b/src/calibre/gui2/preferences/look_feel_tabs/cover_grid.ui @@ -1,423 +1,417 @@ Form - - - - - - 0 + + + 0 + + + + &Layout + + + + QFormLayout::ExpandingFieldsGrow - - - &Layout - - - - QFormLayout::ExpandingFieldsGrow + + + + Control the Cover grid view. You can enable this view by clicking the "Layout" button in the bottom right corner of the main calibre window. - - - - Control the Cover grid view. You can enable this view by clicking the "Layout" button in the bottom right corner of the main calibre window. - - - true - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - Field to show &under the covers: - - - opt_field_under_covers_in_grid - - - - - - - - - - Spac&ing between covers: - - - opt_cover_grid_spacing - - - - - - - The spacing between covers. A value of zero means calculate automatically based on cover size. - - - Automatic - - - cm - - - 2 - - - 0.100000000000000 - - - - - - - Background for the Cover grid - - - - - - - - Cover size - - - - - - Make the covers larger, maintaining current aspect ratio. - - - &Larger covers - - - - :/images/plus.png:/images/plus.png - - - - - - - Make the covers smaller, maintaining current aspect ratio. - - - &Smaller covers - - - - :/images/minus.png:/images/minus.png - - - - - - - Cover &height: - - - opt_cover_grid_height - - - - - - - Cover &width: - - - opt_cover_grid_width - - - - - - - The height of displayed covers. + + true + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + Field to show &under the covers: + + + opt_field_under_covers_in_grid + + + + + + + + + + Spac&ing between covers: + + + opt_cover_grid_spacing + + + + + + + The spacing between covers. A value of zero means calculate automatically based on cover size. + + + Automatic + + + cm + + + 2 + + + 0.100000000000000 + + + + + + + Background for the Cover grid + + + + + + + + Cover size + + + + + + Make the covers larger, maintaining current aspect ratio. + + + &Larger covers + + + + :/images/plus.png:/images/plus.png + + + + + + + Make the covers smaller, maintaining current aspect ratio. + + + &Smaller covers + + + + :/images/minus.png:/images/minus.png + + + + + + + Cover &height: + + + opt_cover_grid_height + + + + + + + Cover &width: + + + opt_cover_grid_width + + + + + + + The height of displayed covers. Aue of zero means calculate automatically. - - - Automatic - - - cm - - - 1 - - - - - - - Reset size to automatic - - - &Reset size - - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - The width of displayed covers. + + + Automatic + + + cm + + + 1 + + + + + + + Reset size to automatic + + + &Reset size + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + The width of displayed covers. Aue of zero means calculate automatically. - - - Automatic - - - cm - - - 1 - - - - - - - - 0 - 0 - - - - By default, calibre chooses a cover size based on your computer's screen size. You can change the cover size here: - - - true - - - - - - - - - - px - - - 16 - - - 1000 - - - - - - - Size of the emblems (if any) shown &next to the covers: - - - opt_emblem_size - - - - - - - Show a &field (such as title) under the covers - - - - - - - &Location of the emblems shown next to the covers: - - - opt_emblem_position - - - - - - - - - - - &Emblems - - - - - &Performance - - - - - - Caching of covers for improved performance - - - - - - There are two kinds of caches that calibre uses to improve performance when rendering covers in the grid view. A disk cache that is kept on your hard disk and stores the cover thumbnails and an in memory cache used to ensure flicker free rendering of covers. For best results, keep the memory cache small and the disk cache large, unless you have a lot of extra RAM in your computer and don't mind it being used by the memory cache. - - - true - - - - - - - Disable - - - MB - - - 100 - - - 100 - - - - - - - &Empty disk cache - - - - - - - &Open cache folder - - - - - - - Qt::Horizontal - - - - 310 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Number of screenfulls of covers to cache in &memory (keep this small): - - - opt_cover_grid_cache_size_multiple - - - - - - - Maximum amount of &disk space to use for caching thumbnails: - - - opt_cover_grid_disk_cache_size - - - - - - - The maximum number of screenfulls of thumbnails to keep in memory. Increasing this will make rendering faster, at the cost of more memory usage. Note that regardless of this setting, a minimum of one hundred thumbnails are always kept in memory, to ensure flicker free rendering. - - - 2 - - - 100 - - - - - - - - - - - - - - - - - - - + + + Automatic + + + cm + + + 1 + + + + + + + + 0 + 0 + + + + By default, calibre chooses a cover size based on your computer's screen size. You can change the cover size here: + + + true + + + + + + + + + + px + + + 16 + + + 1000 + + + + + + + Size of the emblems (if any) shown &next to the covers: + + + opt_emblem_size + + + + + + + Show a &field (such as title) under the covers + + + + + + + &Location of the emblems shown next to the covers: + + + opt_emblem_position + + + + + + + + + + + &Emblems + + + + + &Performance + + + + + + Caching of covers for improved performance + + + + + + There are two kinds of caches that calibre uses to improve performance when rendering covers in the grid view. A disk cache that is kept on your hard disk and stores the cover thumbnails and an in memory cache used to ensure flicker free rendering of covers. For best results, keep the memory cache small and the disk cache large, unless you have a lot of extra RAM in your computer and don't mind it being used by the memory cache. + + + true + + + + + + + Disable + + + MB + + + 100 + + + 100 + + + + + + + &Empty disk cache + + + + + + + &Open cache folder + + + + + + + Qt::Horizontal + + + + 310 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Number of screenfulls of covers to cache in &memory (keep this small): + + + opt_cover_grid_cache_size_multiple + + + + + + + Maximum amount of &disk space to use for caching thumbnails: + + + opt_cover_grid_disk_cache_size + + + + + + + The maximum number of screenfulls of thumbnails to keep in memory. Increasing this will make rendering faster, at the cost of more memory usage. Note that regardless of this setting, a minimum of one hundred thumbnails are always kept in memory, to ensure flicker free rendering. + + + 2 + + + 100 + + + + + + + + + + + + + + + +