From 8aaedf274d99d494e3235ae6e47cecf5eb0a57fb Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sun, 12 Apr 2026 11:30:18 -0700 Subject: [PATCH] add youtube, discord, humble buttons (#1292) * add youtube, discord, humble buttons * restore margins of top buttons * fix button height on windows * don't bold messages --- gui/KCC.ui | 685 +++++++++++++++++--------------- kindlecomicconverter/KCC_gui.py | 19 +- kindlecomicconverter/KCC_ui.py | 498 ++++++++++++----------- 3 files changed, 642 insertions(+), 560 deletions(-) diff --git a/gui/KCC.ui b/gui/KCC.ui index f7311c6..63cd15d 100644 --- a/gui/KCC.ui +++ b/gui/KCC.ui @@ -7,7 +7,7 @@ 0 0 566 - 658 + 671 @@ -22,105 +22,6 @@ 5 - - - - - 0 - 30 - - - - - true - - - - false - - - Qt::AlignmentFlag::AlignJustify|Qt::AlignmentFlag::AlignVCenter - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 30 - - - - <html><head/><body><p style='white-space:pre'>Shift+Click to edit directory.</p></body></html> - - - Metadata Editor - - - - :/Other/icons/editor.png:/Other/icons/editor.png - - - - - - - - 0 - 30 - - - - Support me on Ko-fi - - - - :/Brand/icons/kofi_symbol.png:/Brand/icons/kofi_symbol.png - - - - 19 - 16 - - - - - - - - - 0 - 30 - - - - Wiki - - - - :/Other/icons/wiki.png:/Other/icons/wiki.png - - - - - - @@ -191,88 +92,39 @@ - - + + + + + 0 + 30 + + + + + true + + false - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> - - - Custom height: - - - - - - - <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> - - - 6000 - - - - - - - - 0 - 0 - - - - <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> - - - Custom width: - - - - - - - <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> - - - 8000 - - - - + + Qt::AlignmentFlag::AlignJustify|Qt::AlignmentFlag::AlignVCenter + - - + + - + 0 0 - + + false + + 0 @@ -285,146 +137,27 @@ 0 - - - - - 0 - 30 - - - - - true - - - - <html><head/><body><p style='white-space:pre'>Shift+Click to select the output directory for this list.</p></body></html> - + + - Convert - - - - :/Other/icons/convert.png:/Other/icons/convert.png + JPEG Quality: - - - - - 0 - 30 - + + + + 95 - - Clear list + + 5 - - - :/Other/icons/clear.png:/Other/icons/clear.png - - - - - - - - 0 - 28 - - - - <html><head/><body><p style='white-space:pre'>Target device.</p></body></html> - - - - - - - - 0 - 30 - - - - <html><head/><body><p style='white-space:pre'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html> - - - Add input file(s) - - - - :/Other/icons/document_new.png:/Other/icons/document_new.png - - - - - - - - 0 - 0 - - - - <html><head/><body><p style='white-space:pre'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=" font-weight:600;">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html> - - - Add input folder(s) - - - - :/Other/icons/folder_new.png:/Other/icons/folder_new.png - - - - - - - - 0 - 28 - - - - <html><head/><body><p style='white-space:pre'>Output format.</p></body></html> + + 85 - clearButton - deviceBox - convertButton - fileButton - directoryButton - formatBox - - - - - - - 0 - 150 - - - - <html><head/><body><p>Double click on source to open it in metadata editor.</p></body></html> - - - - - - QAbstractItemView::SelectionMode::NoSelection - - - QAbstractItemView::ScrollMode::ScrollPerPixel - - - QAbstractItemView::ScrollMode::ScrollPerPixel - @@ -499,6 +232,152 @@ + + + + + 0 + 150 + + + + <html><head/><body><p>Double click on source to open it in metadata editor.</p></body></html> + + + + + + QAbstractItemView::SelectionMode::NoSelection + + + QAbstractItemView::ScrollMode::ScrollPerPixel + + + QAbstractItemView::ScrollMode::ScrollPerPixel + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 30 + + + + <html><head/><body><p style='white-space:pre'>Shift+Click to edit directory.</p></body></html> + + + Metadata Editor + + + + :/Other/icons/editor.png:/Other/icons/editor.png + + + + + + + + 0 + 30 + + + + Support me on Ko-fi + + + + :/Brand/icons/kofi_symbol.png:/Brand/icons/kofi_symbol.png + + + + 19 + 16 + + + + + + + + + 0 + 30 + + + + Wiki + + + + :/Other/icons/wiki.png:/Other/icons/wiki.png + + + + + + + + 0 + 30 + + + + YouTube + + + + + + + + 0 + 30 + + + + Humble Bundle Referral + + + + :/Brand/icons/Humble_H-Red.png:/Brand/icons/Humble_H-Red.png + + + + + + + + 0 + 30 + + + + Discord + + + + + + @@ -1009,6 +888,144 @@ Ignored for Kindle EPUB/MOBI and all PDF. + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 30 + + + + + true + + + + <html><head/><body><p style='white-space:pre'>Shift+Click to select the output directory for this list.</p></body></html> + + + Convert + + + + :/Other/icons/convert.png:/Other/icons/convert.png + + + + + + + + 0 + 30 + + + + Clear list + + + + :/Other/icons/clear.png:/Other/icons/clear.png + + + + + + + + 0 + 28 + + + + <html><head/><body><p style='white-space:pre'>Target device.</p></body></html> + + + + + + + + 0 + 30 + + + + <html><head/><body><p style='white-space:pre'>Add CBR, CBZ, CB7 or PDF file to queue.</p></body></html> + + + Add input file(s) + + + + :/Other/icons/document_new.png:/Other/icons/document_new.png + + + + + + + + 0 + 0 + + + + <html><head/><body><p style='white-space:pre'>Add directory containing JPG, PNG or GIF files to queue.<br/><span style=" font-weight:600;">CBR, CBZ and CB7 files inside will not be processed!</span></p></body></html> + + + Add input folder(s) + + + + :/Other/icons/folder_new.png:/Other/icons/folder_new.png + + + + + + + + 0 + 28 + + + + <html><head/><body><p style='white-space:pre'>Output format.</p></body></html> + + + + + clearButton + deviceBox + convertButton + fileButton + directoryButton + formatBox + + @@ -1050,18 +1067,12 @@ Ignored for Kindle EPUB/MOBI and all PDF. - - - - - 0 - 0 - - + + false - + 0 @@ -1074,23 +1085,55 @@ Ignored for Kindle EPUB/MOBI and all PDF. 0 - - + + + + + 0 + 0 + + + + <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> + - JPEG Quality: + Custom height: - - + + + + <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> + - 95 + 6000 - - 5 + + + + + + + 0 + 0 + - - 85 + + <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> + + + Custom width: + + + + + + + <html><head/><body><p style='white-space:pre'>Resolution of the target device.</p></body></html> + + + 8000 diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 4dc4d01..0a2826c 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -195,7 +195,7 @@ class VersionThread(QThread): icon = 'bindle' if category == 'kofi': icon = 'kofi' - message = f"{payload.get('name')}" + message = f"{payload.get('name')}" if payload.get('link'): message = '{}'.format(payload.get('link'), payload.get('name')) if payload.get('showDeadline'): @@ -696,6 +696,18 @@ class KCCGUI(KCC_ui.Ui_mainWindow): # noinspection PyCallByClass QDesktopServices.openUrl(QUrl('https://ko-fi.com/eink_dude')) + def openHumble(self): + # noinspection PyCallByClass + QDesktopServices.openUrl(QUrl('https://humblebundleinc.sjv.io/3JaR3A')) + + def openYouTube(self): + # noinspection PyCallByClass + QDesktopServices.openUrl(QUrl('https://www.youtube.com/@eink-dude')) + + def openDiscord(self): + # noinspection PyCallByClass + QDesktopServices.openUrl(QUrl('https://discord.gg/um5JRKwmGT')) + def modeChange(self, mode): if mode == 1: self.currentMode = 1 @@ -1205,7 +1217,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): 'convertButton', 'formatBox']: getattr(GUI, element).setMinimumSize(QSize(0, 0)) GUI.gridLayout.setContentsMargins(-1, -1, -1, -1) - for element in ['gridLayout_2', 'gridLayout_3', 'gridLayout_4', 'horizontalLayout', 'horizontalLayout_2']: + for element in ['gridLayout_2', 'gridLayout_3', 'gridLayout_4', 'gridLayout_6', 'horizontalLayout_2']: getattr(GUI, element).setContentsMargins(-1, 0, -1, 0) if self.windowSize == '0x0': MW.resize(500, 500) @@ -1413,6 +1425,9 @@ class KCCGUI(KCC_ui.Ui_mainWindow): GUI.editorButton.clicked.connect(self.selectFileMetaEditor) GUI.wikiButton.clicked.connect(self.openWiki) GUI.kofiButton.clicked.connect(self.openKofi) + GUI.humbleButton.clicked.connect(self.openHumble) + GUI.youtubeButton.clicked.connect(self.openYouTube) + GUI.discordButton.clicked.connect(self.openDiscord) GUI.convertButton.clicked.connect(self.convertStart) GUI.gammaSlider.valueChanged.connect(self.changeGamma) GUI.gammaBox.stateChanged.connect(self.togglegammaBox) diff --git a/kindlecomicconverter/KCC_ui.py b/kindlecomicconverter/KCC_ui.py index 7d5b38c..b5f5c9d 100644 --- a/kindlecomicconverter/KCC_ui.py +++ b/kindlecomicconverter/KCC_ui.py @@ -26,7 +26,7 @@ class Ui_mainWindow(object): def setupUi(self, mainWindow): if not mainWindow.objectName(): mainWindow.setObjectName(u"mainWindow") - mainWindow.resize(566, 658) + mainWindow.resize(566, 671) icon = QIcon() icon.addFile(u":/Icon/icons/comic2ebook.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) mainWindow.setWindowIcon(icon) @@ -35,53 +35,6 @@ class Ui_mainWindow(object): self.gridLayout = QGridLayout(self.centralWidget) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setContentsMargins(-1, -1, -1, 5) - self.progressBar = QProgressBar(self.centralWidget) - self.progressBar.setObjectName(u"progressBar") - self.progressBar.setMinimumSize(QSize(0, 30)) - font = QFont() - font.setBold(True) - self.progressBar.setFont(font) - self.progressBar.setVisible(False) - self.progressBar.setAlignment(Qt.AlignmentFlag.AlignJustify|Qt.AlignmentFlag.AlignVCenter) - - self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 2) - - self.toolWidget = QWidget(self.centralWidget) - self.toolWidget.setObjectName(u"toolWidget") - self.horizontalLayout = QHBoxLayout(self.toolWidget) - self.horizontalLayout.setObjectName(u"horizontalLayout") - self.horizontalLayout.setContentsMargins(0, 0, 0, 0) - self.editorButton = QPushButton(self.toolWidget) - self.editorButton.setObjectName(u"editorButton") - self.editorButton.setMinimumSize(QSize(0, 30)) - icon1 = QIcon() - icon1.addFile(u":/Other/icons/editor.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.editorButton.setIcon(icon1) - - self.horizontalLayout.addWidget(self.editorButton) - - self.kofiButton = QPushButton(self.toolWidget) - self.kofiButton.setObjectName(u"kofiButton") - self.kofiButton.setMinimumSize(QSize(0, 30)) - icon2 = QIcon() - icon2.addFile(u":/Brand/icons/kofi_symbol.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.kofiButton.setIcon(icon2) - self.kofiButton.setIconSize(QSize(19, 16)) - - self.horizontalLayout.addWidget(self.kofiButton) - - self.wikiButton = QPushButton(self.toolWidget) - self.wikiButton.setObjectName(u"wikiButton") - self.wikiButton.setMinimumSize(QSize(0, 30)) - icon3 = QIcon() - icon3.addFile(u":/Other/icons/wiki.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.wikiButton.setIcon(icon3) - - self.horizontalLayout.addWidget(self.wikiButton) - - - self.gridLayout.addWidget(self.toolWidget, 0, 0, 1, 2) - self.croppingWidget = QWidget(self.centralWidget) self.croppingWidget.setObjectName(u"croppingWidget") self.croppingWidget.setVisible(False) @@ -122,133 +75,51 @@ class Ui_mainWindow(object): self.gridLayout.addWidget(self.croppingWidget, 9, 0, 1, 2) - self.customWidget = QWidget(self.centralWidget) - self.customWidget.setObjectName(u"customWidget") - self.customWidget.setVisible(False) - self.gridLayout_3 = QGridLayout(self.customWidget) - self.gridLayout_3.setObjectName(u"gridLayout_3") - self.gridLayout_3.setContentsMargins(0, 0, 0, 0) - self.hLabel = QLabel(self.customWidget) - self.hLabel.setObjectName(u"hLabel") + self.progressBar = QProgressBar(self.centralWidget) + self.progressBar.setObjectName(u"progressBar") + self.progressBar.setMinimumSize(QSize(0, 30)) + font = QFont() + font.setBold(True) + self.progressBar.setFont(font) + self.progressBar.setVisible(False) + self.progressBar.setAlignment(Qt.AlignmentFlag.AlignJustify|Qt.AlignmentFlag.AlignVCenter) + + self.gridLayout.addWidget(self.progressBar, 1, 0, 1, 2) + + self.jpegQualityWidget = QWidget(self.centralWidget) + self.jpegQualityWidget.setObjectName(u"jpegQualityWidget") sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) - sizePolicy1.setHeightForWidth(self.hLabel.sizePolicy().hasHeightForWidth()) - self.hLabel.setSizePolicy(sizePolicy1) + sizePolicy1.setHeightForWidth(self.jpegQualityWidget.sizePolicy().hasHeightForWidth()) + self.jpegQualityWidget.setSizePolicy(sizePolicy1) + self.jpegQualityWidget.setVisible(False) + self.horizontalLayout_12 = QHBoxLayout(self.jpegQualityWidget) + self.horizontalLayout_12.setObjectName(u"horizontalLayout_12") + self.horizontalLayout_12.setContentsMargins(0, 0, 0, 0) + self.jpegQualityLabel = QLabel(self.jpegQualityWidget) + self.jpegQualityLabel.setObjectName(u"jpegQualityLabel") - self.gridLayout_3.addWidget(self.hLabel, 0, 2, 1, 1) + self.horizontalLayout_12.addWidget(self.jpegQualityLabel) - self.widthBox = QSpinBox(self.customWidget) - self.widthBox.setObjectName(u"widthBox") - self.widthBox.setMaximum(6000) + self.jpegQualitySpinBox = QSpinBox(self.jpegQualityWidget) + self.jpegQualitySpinBox.setObjectName(u"jpegQualitySpinBox") + self.jpegQualitySpinBox.setMaximum(95) + self.jpegQualitySpinBox.setSingleStep(5) + self.jpegQualitySpinBox.setValue(85) - self.gridLayout_3.addWidget(self.widthBox, 0, 1, 1, 1) - - self.wLabel = QLabel(self.customWidget) - self.wLabel.setObjectName(u"wLabel") - sizePolicy1.setHeightForWidth(self.wLabel.sizePolicy().hasHeightForWidth()) - self.wLabel.setSizePolicy(sizePolicy1) - - self.gridLayout_3.addWidget(self.wLabel, 0, 0, 1, 1) - - self.heightBox = QSpinBox(self.customWidget) - self.heightBox.setObjectName(u"heightBox") - self.heightBox.setMaximum(8000) - - self.gridLayout_3.addWidget(self.heightBox, 0, 3, 1, 1) + self.horizontalLayout_12.addWidget(self.jpegQualitySpinBox) - self.gridLayout.addWidget(self.customWidget, 8, 0, 1, 2) - - self.buttonWidget = QWidget(self.centralWidget) - self.buttonWidget.setObjectName(u"buttonWidget") - sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed) - sizePolicy2.setHorizontalStretch(0) - sizePolicy2.setVerticalStretch(0) - sizePolicy2.setHeightForWidth(self.buttonWidget.sizePolicy().hasHeightForWidth()) - self.buttonWidget.setSizePolicy(sizePolicy2) - self.gridLayout_4 = QGridLayout(self.buttonWidget) - self.gridLayout_4.setObjectName(u"gridLayout_4") - self.gridLayout_4.setContentsMargins(0, 0, 0, 0) - self.convertButton = QPushButton(self.buttonWidget) - self.convertButton.setObjectName(u"convertButton") - self.convertButton.setMinimumSize(QSize(0, 30)) - self.convertButton.setFont(font) - icon4 = QIcon() - icon4.addFile(u":/Other/icons/convert.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.convertButton.setIcon(icon4) - - self.gridLayout_4.addWidget(self.convertButton, 1, 3, 1, 1) - - self.clearButton = QPushButton(self.buttonWidget) - self.clearButton.setObjectName(u"clearButton") - self.clearButton.setMinimumSize(QSize(0, 30)) - icon5 = QIcon() - icon5.addFile(u":/Other/icons/clear.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.clearButton.setIcon(icon5) - - self.gridLayout_4.addWidget(self.clearButton, 0, 3, 1, 1) - - self.deviceBox = QComboBox(self.buttonWidget) - self.deviceBox.setObjectName(u"deviceBox") - self.deviceBox.setMinimumSize(QSize(0, 28)) - - self.gridLayout_4.addWidget(self.deviceBox, 1, 1, 1, 1) - - self.fileButton = QPushButton(self.buttonWidget) - self.fileButton.setObjectName(u"fileButton") - self.fileButton.setMinimumSize(QSize(0, 30)) - icon6 = QIcon() - icon6.addFile(u":/Other/icons/document_new.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.fileButton.setIcon(icon6) - - self.gridLayout_4.addWidget(self.fileButton, 0, 1, 1, 1) - - self.directoryButton = QPushButton(self.buttonWidget) - self.directoryButton.setObjectName(u"directoryButton") - sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum) - sizePolicy3.setHorizontalStretch(0) - sizePolicy3.setVerticalStretch(0) - sizePolicy3.setHeightForWidth(self.directoryButton.sizePolicy().hasHeightForWidth()) - self.directoryButton.setSizePolicy(sizePolicy3) - icon7 = QIcon() - icon7.addFile(u":/Other/icons/folder_new.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) - self.directoryButton.setIcon(icon7) - - self.gridLayout_4.addWidget(self.directoryButton, 0, 4, 1, 1) - - self.formatBox = QComboBox(self.buttonWidget) - self.formatBox.setObjectName(u"formatBox") - self.formatBox.setMinimumSize(QSize(0, 28)) - - self.gridLayout_4.addWidget(self.formatBox, 1, 4, 1, 1) - - self.clearButton.raise_() - self.deviceBox.raise_() - self.convertButton.raise_() - self.fileButton.raise_() - self.directoryButton.raise_() - self.formatBox.raise_() - - self.gridLayout.addWidget(self.buttonWidget, 3, 0, 1, 2) - - self.jobList = QListWidget(self.centralWidget) - self.jobList.setObjectName(u"jobList") - self.jobList.setMinimumSize(QSize(0, 150)) - self.jobList.setStyleSheet(u"") - self.jobList.setSelectionMode(QAbstractItemView.SelectionMode.NoSelection) - self.jobList.setVerticalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel) - self.jobList.setHorizontalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel) - - self.gridLayout.addWidget(self.jobList, 2, 0, 1, 2) + self.gridLayout.addWidget(self.jpegQualityWidget, 10, 0, 1, 1) self.chunkSizeWidget = QWidget(self.centralWidget) self.chunkSizeWidget.setObjectName(u"chunkSizeWidget") - sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed) - sizePolicy4.setHorizontalStretch(0) - sizePolicy4.setVerticalStretch(0) - sizePolicy4.setHeightForWidth(self.chunkSizeWidget.sizePolicy().hasHeightForWidth()) - self.chunkSizeWidget.setSizePolicy(sizePolicy4) + sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed) + sizePolicy2.setHorizontalStretch(0) + sizePolicy2.setVerticalStretch(0) + sizePolicy2.setHeightForWidth(self.chunkSizeWidget.sizePolicy().hasHeightForWidth()) + self.chunkSizeWidget.setSizePolicy(sizePolicy2) self.chunkSizeWidget.setVisible(False) self.horizontalLayout_4 = QHBoxLayout(self.chunkSizeWidget) self.horizontalLayout_4.setSpacing(0) @@ -256,11 +127,11 @@ class Ui_mainWindow(object): self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0) self.chunkSizeLabel = QLabel(self.chunkSizeWidget) self.chunkSizeLabel.setObjectName(u"chunkSizeLabel") - sizePolicy5 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred) - sizePolicy5.setHorizontalStretch(0) - sizePolicy5.setVerticalStretch(0) - sizePolicy5.setHeightForWidth(self.chunkSizeLabel.sizePolicy().hasHeightForWidth()) - self.chunkSizeLabel.setSizePolicy(sizePolicy5) + sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred) + sizePolicy3.setHorizontalStretch(0) + sizePolicy3.setVerticalStretch(0) + sizePolicy3.setHeightForWidth(self.chunkSizeLabel.sizePolicy().hasHeightForWidth()) + self.chunkSizeLabel.setSizePolicy(sizePolicy3) self.horizontalLayout_4.addWidget(self.chunkSizeLabel) @@ -274,14 +145,81 @@ class Ui_mainWindow(object): self.chunkSizeWarnLabel = QLabel(self.chunkSizeWidget) self.chunkSizeWarnLabel.setObjectName(u"chunkSizeWarnLabel") - sizePolicy5.setHeightForWidth(self.chunkSizeWarnLabel.sizePolicy().hasHeightForWidth()) - self.chunkSizeWarnLabel.setSizePolicy(sizePolicy5) + sizePolicy3.setHeightForWidth(self.chunkSizeWarnLabel.sizePolicy().hasHeightForWidth()) + self.chunkSizeWarnLabel.setSizePolicy(sizePolicy3) self.horizontalLayout_4.addWidget(self.chunkSizeWarnLabel) self.gridLayout.addWidget(self.chunkSizeWidget, 6, 0, 1, 1) + self.jobList = QListWidget(self.centralWidget) + self.jobList.setObjectName(u"jobList") + self.jobList.setMinimumSize(QSize(0, 150)) + self.jobList.setStyleSheet(u"") + self.jobList.setSelectionMode(QAbstractItemView.SelectionMode.NoSelection) + self.jobList.setVerticalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel) + self.jobList.setHorizontalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel) + + self.gridLayout.addWidget(self.jobList, 2, 0, 1, 2) + + self.toolWidget = QWidget(self.centralWidget) + self.toolWidget.setObjectName(u"toolWidget") + self.gridLayout_6 = QGridLayout(self.toolWidget) + self.gridLayout_6.setObjectName(u"gridLayout_6") + self.gridLayout_6.setContentsMargins(0, 0, 0, 0) + self.editorButton = QPushButton(self.toolWidget) + self.editorButton.setObjectName(u"editorButton") + self.editorButton.setMinimumSize(QSize(0, 30)) + icon1 = QIcon() + icon1.addFile(u":/Other/icons/editor.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.editorButton.setIcon(icon1) + + self.gridLayout_6.addWidget(self.editorButton, 0, 0, 1, 1) + + self.kofiButton = QPushButton(self.toolWidget) + self.kofiButton.setObjectName(u"kofiButton") + self.kofiButton.setMinimumSize(QSize(0, 30)) + icon2 = QIcon() + icon2.addFile(u":/Brand/icons/kofi_symbol.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.kofiButton.setIcon(icon2) + self.kofiButton.setIconSize(QSize(19, 16)) + + self.gridLayout_6.addWidget(self.kofiButton, 0, 1, 1, 1) + + self.wikiButton = QPushButton(self.toolWidget) + self.wikiButton.setObjectName(u"wikiButton") + self.wikiButton.setMinimumSize(QSize(0, 30)) + icon3 = QIcon() + icon3.addFile(u":/Other/icons/wiki.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.wikiButton.setIcon(icon3) + + self.gridLayout_6.addWidget(self.wikiButton, 0, 2, 1, 1) + + self.youtubeButton = QPushButton(self.toolWidget) + self.youtubeButton.setObjectName(u"youtubeButton") + self.youtubeButton.setMinimumSize(QSize(0, 30)) + + self.gridLayout_6.addWidget(self.youtubeButton, 1, 0, 1, 1) + + self.humbleButton = QPushButton(self.toolWidget) + self.humbleButton.setObjectName(u"humbleButton") + self.humbleButton.setMinimumSize(QSize(0, 30)) + icon4 = QIcon() + icon4.addFile(u":/Brand/icons/Humble_H-Red.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.humbleButton.setIcon(icon4) + + self.gridLayout_6.addWidget(self.humbleButton, 1, 1, 1, 1) + + self.discordButton = QPushButton(self.toolWidget) + self.discordButton.setObjectName(u"discordButton") + self.discordButton.setMinimumSize(QSize(0, 30)) + + self.gridLayout_6.addWidget(self.discordButton, 1, 2, 1, 1) + + + self.gridLayout.addWidget(self.toolWidget, 0, 0, 1, 2) + self.optionWidget = QWidget(self.centralWidget) self.optionWidget.setObjectName(u"optionWidget") self.gridLayout_2 = QGridLayout(self.optionWidget) @@ -317,8 +255,8 @@ class Ui_mainWindow(object): self.titleEdit = QLineEdit(self.optionWidget) self.titleEdit.setObjectName(u"titleEdit") - sizePolicy4.setHeightForWidth(self.titleEdit.sizePolicy().hasHeightForWidth()) - self.titleEdit.setSizePolicy(sizePolicy4) + sizePolicy2.setHeightForWidth(self.titleEdit.sizePolicy().hasHeightForWidth()) + self.titleEdit.setSizePolicy(sizePolicy2) self.titleEdit.setFocusPolicy(Qt.FocusPolicy.ClickFocus) self.titleEdit.setClearButtonEnabled(False) @@ -326,8 +264,8 @@ class Ui_mainWindow(object): self.authorEdit = QLineEdit(self.optionWidget) self.authorEdit.setObjectName(u"authorEdit") - sizePolicy4.setHeightForWidth(self.authorEdit.sizePolicy().hasHeightForWidth()) - self.authorEdit.setSizePolicy(sizePolicy4) + sizePolicy2.setHeightForWidth(self.authorEdit.sizePolicy().hasHeightForWidth()) + self.authorEdit.setSizePolicy(sizePolicy2) self.authorEdit.setFocusPolicy(Qt.FocusPolicy.ClickFocus) self.authorEdit.setClearButtonEnabled(False) @@ -487,7 +425,9 @@ class Ui_mainWindow(object): self.defaultOutputFolderButton = QPushButton(self.outputFolderWidget) self.defaultOutputFolderButton.setObjectName(u"defaultOutputFolderButton") self.defaultOutputFolderButton.setMinimumSize(QSize(0, 30)) - self.defaultOutputFolderButton.setIcon(icon7) + icon5 = QIcon() + icon5.addFile(u":/Other/icons/folder_new.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.defaultOutputFolderButton.setIcon(icon5) self.horizontalLayout_3.addWidget(self.defaultOutputFolderButton) @@ -513,6 +453,76 @@ class Ui_mainWindow(object): self.gridLayout.addWidget(self.optionWidget, 5, 0, 1, 2) + self.buttonWidget = QWidget(self.centralWidget) + self.buttonWidget.setObjectName(u"buttonWidget") + sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed) + sizePolicy4.setHorizontalStretch(0) + sizePolicy4.setVerticalStretch(0) + sizePolicy4.setHeightForWidth(self.buttonWidget.sizePolicy().hasHeightForWidth()) + self.buttonWidget.setSizePolicy(sizePolicy4) + self.gridLayout_4 = QGridLayout(self.buttonWidget) + self.gridLayout_4.setObjectName(u"gridLayout_4") + self.gridLayout_4.setContentsMargins(0, 0, 0, 0) + self.convertButton = QPushButton(self.buttonWidget) + self.convertButton.setObjectName(u"convertButton") + self.convertButton.setMinimumSize(QSize(0, 30)) + self.convertButton.setFont(font) + icon6 = QIcon() + icon6.addFile(u":/Other/icons/convert.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.convertButton.setIcon(icon6) + + self.gridLayout_4.addWidget(self.convertButton, 1, 3, 1, 1) + + self.clearButton = QPushButton(self.buttonWidget) + self.clearButton.setObjectName(u"clearButton") + self.clearButton.setMinimumSize(QSize(0, 30)) + icon7 = QIcon() + icon7.addFile(u":/Other/icons/clear.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.clearButton.setIcon(icon7) + + self.gridLayout_4.addWidget(self.clearButton, 0, 3, 1, 1) + + self.deviceBox = QComboBox(self.buttonWidget) + self.deviceBox.setObjectName(u"deviceBox") + self.deviceBox.setMinimumSize(QSize(0, 28)) + + self.gridLayout_4.addWidget(self.deviceBox, 1, 1, 1, 1) + + self.fileButton = QPushButton(self.buttonWidget) + self.fileButton.setObjectName(u"fileButton") + self.fileButton.setMinimumSize(QSize(0, 30)) + icon8 = QIcon() + icon8.addFile(u":/Other/icons/document_new.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off) + self.fileButton.setIcon(icon8) + + self.gridLayout_4.addWidget(self.fileButton, 0, 1, 1, 1) + + self.directoryButton = QPushButton(self.buttonWidget) + self.directoryButton.setObjectName(u"directoryButton") + sizePolicy5 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum) + sizePolicy5.setHorizontalStretch(0) + sizePolicy5.setVerticalStretch(0) + sizePolicy5.setHeightForWidth(self.directoryButton.sizePolicy().hasHeightForWidth()) + self.directoryButton.setSizePolicy(sizePolicy5) + self.directoryButton.setIcon(icon5) + + self.gridLayout_4.addWidget(self.directoryButton, 0, 4, 1, 1) + + self.formatBox = QComboBox(self.buttonWidget) + self.formatBox.setObjectName(u"formatBox") + self.formatBox.setMinimumSize(QSize(0, 28)) + + self.gridLayout_4.addWidget(self.formatBox, 1, 4, 1, 1) + + self.clearButton.raise_() + self.deviceBox.raise_() + self.convertButton.raise_() + self.fileButton.raise_() + self.directoryButton.raise_() + self.formatBox.raise_() + + self.gridLayout.addWidget(self.buttonWidget, 3, 0, 1, 2) + self.gammaWidget = QWidget(self.centralWidget) self.gammaWidget.setObjectName(u"gammaWidget") self.gammaWidget.setVisible(False) @@ -535,29 +545,40 @@ class Ui_mainWindow(object): self.gridLayout.addWidget(self.gammaWidget, 7, 0, 1, 2) - self.jpegQualityWidget = QWidget(self.centralWidget) - self.jpegQualityWidget.setObjectName(u"jpegQualityWidget") - sizePolicy1.setHeightForWidth(self.jpegQualityWidget.sizePolicy().hasHeightForWidth()) - self.jpegQualityWidget.setSizePolicy(sizePolicy1) - self.jpegQualityWidget.setVisible(False) - self.horizontalLayout_12 = QHBoxLayout(self.jpegQualityWidget) - self.horizontalLayout_12.setObjectName(u"horizontalLayout_12") - self.horizontalLayout_12.setContentsMargins(0, 0, 0, 0) - self.jpegQualityLabel = QLabel(self.jpegQualityWidget) - self.jpegQualityLabel.setObjectName(u"jpegQualityLabel") + self.customWidget = QWidget(self.centralWidget) + self.customWidget.setObjectName(u"customWidget") + self.customWidget.setVisible(False) + self.gridLayout_3 = QGridLayout(self.customWidget) + self.gridLayout_3.setObjectName(u"gridLayout_3") + self.gridLayout_3.setContentsMargins(0, 0, 0, 0) + self.hLabel = QLabel(self.customWidget) + self.hLabel.setObjectName(u"hLabel") + sizePolicy1.setHeightForWidth(self.hLabel.sizePolicy().hasHeightForWidth()) + self.hLabel.setSizePolicy(sizePolicy1) - self.horizontalLayout_12.addWidget(self.jpegQualityLabel) + self.gridLayout_3.addWidget(self.hLabel, 0, 2, 1, 1) - self.jpegQualitySpinBox = QSpinBox(self.jpegQualityWidget) - self.jpegQualitySpinBox.setObjectName(u"jpegQualitySpinBox") - self.jpegQualitySpinBox.setMaximum(95) - self.jpegQualitySpinBox.setSingleStep(5) - self.jpegQualitySpinBox.setValue(85) + self.widthBox = QSpinBox(self.customWidget) + self.widthBox.setObjectName(u"widthBox") + self.widthBox.setMaximum(6000) - self.horizontalLayout_12.addWidget(self.jpegQualitySpinBox) + self.gridLayout_3.addWidget(self.widthBox, 0, 1, 1, 1) + + self.wLabel = QLabel(self.customWidget) + self.wLabel.setObjectName(u"wLabel") + sizePolicy1.setHeightForWidth(self.wLabel.sizePolicy().hasHeightForWidth()) + self.wLabel.setSizePolicy(sizePolicy1) + + self.gridLayout_3.addWidget(self.wLabel, 0, 0, 1, 1) + + self.heightBox = QSpinBox(self.customWidget) + self.heightBox.setObjectName(u"heightBox") + self.heightBox.setMaximum(8000) + + self.gridLayout_3.addWidget(self.heightBox, 0, 3, 1, 1) - self.gridLayout.addWidget(self.jpegQualityWidget, 10, 0, 1, 1) + self.gridLayout.addWidget(self.customWidget, 8, 0, 1, 2) mainWindow.setCentralWidget(self.centralWidget) self.statusBar = QStatusBar(mainWindow) @@ -610,58 +631,29 @@ class Ui_mainWindow(object): def retranslateUi(self, mainWindow): mainWindow.setWindowTitle(QCoreApplication.translate("mainWindow", u"Kindle Comic Converter", None)) -#if QT_CONFIG(tooltip) - self.editorButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Shift+Click to edit directory.

", None)) -#endif // QT_CONFIG(tooltip) - self.editorButton.setText(QCoreApplication.translate("mainWindow", u"Metadata Editor", None)) - self.kofiButton.setText(QCoreApplication.translate("mainWindow", u"Support me on Ko-fi", None)) - self.wikiButton.setText(QCoreApplication.translate("mainWindow", u"Wiki", None)) #if QT_CONFIG(tooltip) self.preserveMarginLabel.setToolTip(QCoreApplication.translate("mainWindow", u"

After calculating the cropping boundaries, "back up" a specified percentage amount.

", None)) #endif // QT_CONFIG(tooltip) self.preserveMarginLabel.setText(QCoreApplication.translate("mainWindow", u"Preserve Margin %", None)) self.croppingPowerLabel.setText(QCoreApplication.translate("mainWindow", u"Cropping power:", None)) -#if QT_CONFIG(tooltip) - self.hLabel.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) -#endif // QT_CONFIG(tooltip) - self.hLabel.setText(QCoreApplication.translate("mainWindow", u"Custom height:", None)) -#if QT_CONFIG(tooltip) - self.widthBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) -#endif // QT_CONFIG(tooltip) -#if QT_CONFIG(tooltip) - self.wLabel.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) -#endif // QT_CONFIG(tooltip) - self.wLabel.setText(QCoreApplication.translate("mainWindow", u"Custom width:", None)) -#if QT_CONFIG(tooltip) - self.heightBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) -#endif // QT_CONFIG(tooltip) -#if QT_CONFIG(tooltip) - self.convertButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Shift+Click to select the output directory for this list.

", None)) -#endif // QT_CONFIG(tooltip) - self.convertButton.setText(QCoreApplication.translate("mainWindow", u"Convert", None)) - self.clearButton.setText(QCoreApplication.translate("mainWindow", u"Clear list", None)) -#if QT_CONFIG(tooltip) - self.deviceBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Target device.

", None)) -#endif // QT_CONFIG(tooltip) -#if QT_CONFIG(tooltip) - self.fileButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Add CBR, CBZ, CB7 or PDF file to queue.

", None)) -#endif // QT_CONFIG(tooltip) - self.fileButton.setText(QCoreApplication.translate("mainWindow", u"Add input file(s)", None)) -#if QT_CONFIG(tooltip) - self.directoryButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Add directory containing JPG, PNG or GIF files to queue.
CBR, CBZ and CB7 files inside will not be processed!

", None)) -#endif // QT_CONFIG(tooltip) - self.directoryButton.setText(QCoreApplication.translate("mainWindow", u"Add input folder(s)", None)) -#if QT_CONFIG(tooltip) - self.formatBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Output format.

", None)) -#endif // QT_CONFIG(tooltip) -#if QT_CONFIG(tooltip) - self.jobList.setToolTip(QCoreApplication.translate("mainWindow", u"

Double click on source to open it in metadata editor.

", None)) -#endif // QT_CONFIG(tooltip) + self.jpegQualityLabel.setText(QCoreApplication.translate("mainWindow", u"JPEG Quality:", None)) #if QT_CONFIG(tooltip) self.chunkSizeWidget.setToolTip(QCoreApplication.translate("mainWindow", u"

Warning: chunk size greater than default may cause
performance/battery issues, especially on older devices.

", None)) #endif // QT_CONFIG(tooltip) self.chunkSizeLabel.setText(QCoreApplication.translate("mainWindow", u"Chunk size MB:", None)) self.chunkSizeWarnLabel.setText(QCoreApplication.translate("mainWindow", u"Greater than default may cause performance issues on older ereaders.", None)) +#if QT_CONFIG(tooltip) + self.jobList.setToolTip(QCoreApplication.translate("mainWindow", u"

Double click on source to open it in metadata editor.

", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + self.editorButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Shift+Click to edit directory.

", None)) +#endif // QT_CONFIG(tooltip) + self.editorButton.setText(QCoreApplication.translate("mainWindow", u"Metadata Editor", None)) + self.kofiButton.setText(QCoreApplication.translate("mainWindow", u"Support me on Ko-fi", None)) + self.wikiButton.setText(QCoreApplication.translate("mainWindow", u"Wiki", None)) + self.youtubeButton.setText(QCoreApplication.translate("mainWindow", u"YouTube", None)) + self.humbleButton.setText(QCoreApplication.translate("mainWindow", u"Humble Bundle Referral", None)) + self.discordButton.setText(QCoreApplication.translate("mainWindow", u"Discord", None)) #if QT_CONFIG(tooltip) self.noRotateBox.setToolTip(QCoreApplication.translate("mainWindow", u"Do not rotate double page spreads in spread splitter option.", None)) #endif // QT_CONFIG(tooltip) @@ -829,7 +821,39 @@ class Ui_mainWindow(object): "Ignored for Kindle EPUB/MOBI and all PDF.", None)) #endif // QT_CONFIG(tooltip) self.webpBox.setText(QCoreApplication.translate("mainWindow", u"WebP (experimental)", None)) +#if QT_CONFIG(tooltip) + self.convertButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Shift+Click to select the output directory for this list.

", None)) +#endif // QT_CONFIG(tooltip) + self.convertButton.setText(QCoreApplication.translate("mainWindow", u"Convert", None)) + self.clearButton.setText(QCoreApplication.translate("mainWindow", u"Clear list", None)) +#if QT_CONFIG(tooltip) + self.deviceBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Target device.

", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + self.fileButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Add CBR, CBZ, CB7 or PDF file to queue.

", None)) +#endif // QT_CONFIG(tooltip) + self.fileButton.setText(QCoreApplication.translate("mainWindow", u"Add input file(s)", None)) +#if QT_CONFIG(tooltip) + self.directoryButton.setToolTip(QCoreApplication.translate("mainWindow", u"

Add directory containing JPG, PNG or GIF files to queue.
CBR, CBZ and CB7 files inside will not be processed!

", None)) +#endif // QT_CONFIG(tooltip) + self.directoryButton.setText(QCoreApplication.translate("mainWindow", u"Add input folder(s)", None)) +#if QT_CONFIG(tooltip) + self.formatBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Output format.

", None)) +#endif // QT_CONFIG(tooltip) self.gammaLabel.setText(QCoreApplication.translate("mainWindow", u"Gamma: Auto", None)) - self.jpegQualityLabel.setText(QCoreApplication.translate("mainWindow", u"JPEG Quality:", None)) +#if QT_CONFIG(tooltip) + self.hLabel.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) +#endif // QT_CONFIG(tooltip) + self.hLabel.setText(QCoreApplication.translate("mainWindow", u"Custom height:", None)) +#if QT_CONFIG(tooltip) + self.widthBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + self.wLabel.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) +#endif // QT_CONFIG(tooltip) + self.wLabel.setText(QCoreApplication.translate("mainWindow", u"Custom width:", None)) +#if QT_CONFIG(tooltip) + self.heightBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Resolution of the target device.

", None)) +#endif // QT_CONFIG(tooltip) # retranslateUi