From 2ac50f66ef17e048bb57dcda7735fada8f6b9b72 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 21 Sep 2026 13:38:39 -0700 Subject: [PATCH] add Legacy Panel View option from KCC 6 (#1445) --- README.md | 3 ++- gui/KCC.ui | 32 ++++++++++++++++++++--------- kindlecomicconverter/KCC_gui.py | 5 +++++ kindlecomicconverter/KCC_ui.py | 29 ++++++++++++++++++-------- kindlecomicconverter/comic2ebook.py | 4 +++- 5 files changed, 52 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index dcee428a..db4ec730 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,8 @@ MAIN: --invertdirection Invert page turn direction -q, --hq Try to increase the quality of magnification -2, --two-panel Display two not four panels in Panel View mode - --vertical4panel Show side panels first in virtual panel view + --vertical4panel Show side panels first in virtual panel view + --legacypanelview Use legacy panel view method from KCC 6 -w, --webtoon Webtoon processing mode --ts TARGETSIZE, --targetsize TARGETSIZE the maximal size of output file in MB. [Default=100MB for webtoon and 400MB for others] diff --git a/gui/KCC.ui b/gui/KCC.ui index 00c0b074..34cdeb14 100644 --- a/gui/KCC.ui +++ b/gui/KCC.ui @@ -419,16 +419,6 @@ Use if standard extraction fails for whatever reason. - - - - <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Main Drive<br/></span>Use dedicated temporary directory on main OS drive.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Source File Drive<br/></span>Create temporary file directory on source file drive.</p></body></html> - - - Temp Directory - - - @@ -984,6 +974,28 @@ Keeping this file may crash some readers like the Kobo native CBZ reader. + + + + <html><head/><body><p><span style=" font-weight:600; text-decoration: underline;">Unchecked - Main Drive<br/></span>Use dedicated temporary directory on main OS drive.</p><p><span style=" font-weight:600; text-decoration: underline;">Checked - Source File Drive<br/></span>Create temporary file directory on source file drive.</p></body></html> + + + Temp Directory + + + + + + + Use legacy panel view method from KCC 6. + +Kind of works on firmwares 5.19.2 (before revert) and 5.19.3+ + + + Legacy Panel View + + + diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index ba377ed2..91c8a0a6 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -270,6 +270,8 @@ def get_options(): options.autoscale = True elif GUI.qualityBox.checkState() == Qt.CheckState.Checked: options.hq = True + if GUI.legacyPanelViewBox.isChecked(): + options.legacypanelview = True if GUI.vertical4PanelBox.isChecked(): options.vertical4panel = True if GUI.webtoonBox.isChecked(): @@ -859,6 +861,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): GUI.autoLevelBox.show() GUI.autocontrastBox.show() GUI.vertical4PanelBox.show() + GUI.legacyPanelViewBox.show() GUI.tempDirBox.show() GUI.deleteBox.show() GUI.metadataTitleBox.show() @@ -897,6 +900,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): GUI.autoLevelBox.hide() GUI.autocontrastBox.hide() GUI.vertical4PanelBox.hide() + GUI.legacyPanelViewBox.hide() GUI.tempDirBox.hide() GUI.deleteBox.hide() GUI.metadataTitleBox.hide() @@ -1295,6 +1299,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): 'rotateBox': GUI.rotateBox.checkState(), 'qualityBox': GUI.qualityBox.checkState(), 'vertical4PanelBox': GUI.vertical4PanelBox.checkState(), + 'legacyPanelViewBox': GUI.vertical4PanelBox.checkState(), 'gammaBox': GUI.gammaBox.checkState(), 'autoLevelBox': GUI.autoLevelBox.checkState(), 'autocontrastBox': GUI.autocontrastBox.checkState(), diff --git a/kindlecomicconverter/KCC_ui.py b/kindlecomicconverter/KCC_ui.py index b7a5b5eb..3bee2e74 100644 --- a/kindlecomicconverter/KCC_ui.py +++ b/kindlecomicconverter/KCC_ui.py @@ -240,11 +240,6 @@ class Ui_mainWindow(object): self.gridLayout_2.addWidget(self.outputSplit, 4, 1, 1, 1) - self.tempDirBox = QCheckBox(self.optionWidget) - self.tempDirBox.setObjectName(u"tempDirBox") - - self.gridLayout_2.addWidget(self.tempDirBox, 10, 2, 1, 1) - self.disableProcessingBox = QCheckBox(self.optionWidget) self.disableProcessingBox.setObjectName(u"disableProcessingBox") @@ -499,6 +494,16 @@ class Ui_mainWindow(object): self.gridLayout_2.addWidget(self.keepComicInfoBox, 3, 3, 1, 1) + self.tempDirBox = QCheckBox(self.optionWidget) + self.tempDirBox.setObjectName(u"tempDirBox") + + self.gridLayout_2.addWidget(self.tempDirBox, 11, 2, 1, 1) + + self.legacyPanelViewBox = QCheckBox(self.optionWidget) + self.legacyPanelViewBox.setObjectName(u"legacyPanelViewBox") + + self.gridLayout_2.addWidget(self.legacyPanelViewBox, 10, 2, 1, 1) + self.gridLayout.addWidget(self.optionWidget, 5, 0, 1, 2) @@ -715,10 +720,6 @@ class Ui_mainWindow(object): self.outputSplit.setToolTip(QCoreApplication.translate("mainWindow", u"

Unchecked - Automatic mode
The output will be split automatically.

Checked - Volume mode
Every subdirectory will be considered as a separate volume.

", None)) #endif // QT_CONFIG(tooltip) self.outputSplit.setText(QCoreApplication.translate("mainWindow", u"Output split", None)) -#if QT_CONFIG(tooltip) - self.tempDirBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Unchecked - Main Drive
Use dedicated temporary directory on main OS drive.

Checked - Source File Drive
Create temporary file directory on source file drive.

", None)) -#endif // QT_CONFIG(tooltip) - self.tempDirBox.setText(QCoreApplication.translate("mainWindow", u"Temp Directory", None)) #if QT_CONFIG(tooltip) self.disableProcessingBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Do not process any image, ignore profile and processing options.

", None)) #endif // QT_CONFIG(tooltip) @@ -910,6 +911,16 @@ class Ui_mainWindow(object): "Keeping this file may crash some readers like the Kobo native CBZ reader.", None)) #endif // QT_CONFIG(tooltip) self.keepComicInfoBox.setText(QCoreApplication.translate("mainWindow", u"Keep ComicInfo.xml", None)) +#if QT_CONFIG(tooltip) + self.tempDirBox.setToolTip(QCoreApplication.translate("mainWindow", u"

Unchecked - Main Drive
Use dedicated temporary directory on main OS drive.

Checked - Source File Drive
Create temporary file directory on source file drive.

", None)) +#endif // QT_CONFIG(tooltip) + self.tempDirBox.setText(QCoreApplication.translate("mainWindow", u"Temp Directory", None)) +#if QT_CONFIG(tooltip) + self.legacyPanelViewBox.setToolTip(QCoreApplication.translate("mainWindow", u"Use legacy panel view method from KCC 6.\n" +"\n" +"Kind of works on firmwares 5.19.2 (before revert) and 5.19.3+", None)) +#endif // QT_CONFIG(tooltip) + self.legacyPanelViewBox.setText(QCoreApplication.translate("mainWindow", u"Legacy Panel View", None)) self.jpegQualityLabel.setText(QCoreApplication.translate("mainWindow", u"JPEG Quality:", None)) #if QT_CONFIG(tooltip) self.labelSpreadsButton.setToolTip(QCoreApplication.translate("mainWindow", u"Hold shift while clicking for a low quality preview.", None)) diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index f8f8cfa6..aca6bbd4 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -1498,6 +1498,8 @@ def makeParser(): help="Display two not four panels in Panel View mode") main_options.add_argument("--vertical4panel", action="store_true", dest="vertical4panel", default=False, help="Display side panels first in virtual panel view") + main_options.add_argument("--legacypanelview", action="store_true", dest="legacypanelview", default=False, + help="Use legacy panel view method from KCC 6") main_options.add_argument("-w", "--webtoon", action="store_true", dest="webtoon", default=False, help="Webtoon processing mode"), main_options.add_argument("--ts", "--targetsize", type=int, dest="targetsize", default=None, @@ -1679,7 +1681,7 @@ def checkOptions(options): if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'K34' or options.profile == 'KDX': options.panelview = False options.hq = False - if not options.hq and not options.autoscale: + if not options.hq and not options.autoscale and not options.legacypanelview: options.panelview = False # Webtoon mode mandatory options if options.webtoon: