From 01f3596fde6a226b47befb6cb57b3faebe5662d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?=
Date: Sun, 6 Oct 2013 18:31:48 +0200
Subject: [PATCH] GUI improvements
---
KCC-Linux.ui | 2 +-
KCC-OSX.ui | 2 +-
KCC.ui | 2 +-
README.md | 1 -
kcc/KCC_gui.py | 11 ++++-------
kcc/KCC_ui.py | 4 ++--
kcc/KCC_ui_linux.py | 4 ++--
kcc/KCC_ui_osx.py | 4 ++--
8 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/KCC-Linux.ui b/KCC-Linux.ui
index 3ec09de..95e794d 100644
--- a/KCC-Linux.ui
+++ b/KCC-Linux.ui
@@ -131,7 +131,7 @@
Qt::NoFocus
- <html><head/><body><p>Create PNG files instead JPEG.<br/>Output files will be ~33% smaller.<br/><span style=" font-weight:600;">MOBI creation will be ~3x slower.</span></p></body></html>
+ <html><head/><body><p>Create PNG files instead JPEG.<br/>Output files might be smaller.<br/><span style=" font-weight:600;">MOBI creation will be much slower.</span></p></body></html>
PNG output
diff --git a/KCC-OSX.ui b/KCC-OSX.ui
index 4fd6d3d..1f32607 100644
--- a/KCC-OSX.ui
+++ b/KCC-OSX.ui
@@ -132,7 +132,7 @@
Qt::NoFocus
- <html><head/><body><p><span style=" font-size:12pt;">Create PNG files instead JPEG.<br/>Output files will be ~33% smaller.<br/></span><span style=" font-size:12pt; font-weight:600;">MOBI creation will be ~3x slower.</span></p></body></html>
+ <html><head/><body><p><span style=" font-size:12pt;">Create PNG files instead JPEG.<br/>Output files might be smaller.<br/></span><span style=" font-size:12pt; font-weight:600;">MOBI creation will be much slower.</span></p></body></html>
PNG output
diff --git a/KCC.ui b/KCC.ui
index ae920bb..4aa6832 100644
--- a/KCC.ui
+++ b/KCC.ui
@@ -110,7 +110,7 @@
Qt::NoFocus
- <html><head/><body><p>Create PNG files instead JPEG.<br/>Output files will be ~33% smaller.<br/><span style=" font-weight:600;">MOBI creation will be ~3x slower.</span></p></body></html>
+ <html><head/><body><p>Create PNG files instead JPEG.<br/>Output files might be smaller.<br/><span style=" font-weight:600;">MOBI creation will be much slower.</span></p></body></html>
PNG output
diff --git a/README.md b/README.md
index 9f494c9..d6b7c0e 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,6 @@ You can find the latest released binary at the following links:
* Use high quality source files. **This little detail have a major impact on the final result.**
* Read tooltip of _High/Ultra quality_ option. There are many important informations there.
* When converting images smaller than device resolution remember to enable upscaling.
-* Enabling _PNG output_ can decrease size of created file up to 33%. But it also highly increase time needed to create MOBI.
* Panel View (auto zooming every part of page) can be disabled directly on Kindle. There is no KCC option to do that.
* If you're converting color images and the end result is not satisfactory, experiment with gamma correction option (check 1.0 setting first).
* Check our [wiki](https://github.com/ciromattia/kcc/wiki/Other-devices) for a list of tested Non-Kindle E-Readers.
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index c487a3a..9ff6bf6 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -537,23 +537,19 @@ class Ui_KCC(object):
if value in [9, 11, 12, 13, 14]:
GUI.QualityBox.setChecked(False)
GUI.QualityBox.setEnabled(False)
+ self.QualityBoxDisabled = True
else:
if not GUI.WebtoonBox.isChecked() and not GUI.ProcessingBox.isChecked() \
and str(GUI.FormatBox.currentText()) != 'CBZ':
GUI.QualityBox.setEnabled(True)
- if value in [3, 4, 5, 6, 8, 15]:
- GUI.NoDitheringBox.setChecked(False)
- GUI.NoDitheringBox.setEnabled(False)
- else:
- if not GUI.ProcessingBox.isChecked():
- GUI.NoDitheringBox.setEnabled(True)
+ self.QualityBoxDisabled = False
def changeFormat(self):
if str(GUI.FormatBox.currentText()) == 'CBZ':
GUI.QualityBox.setChecked(False)
GUI.QualityBox.setEnabled(False)
else:
- if not GUI.WebtoonBox.isChecked() and not GUI.ProcessingBox.isChecked():
+ if not GUI.WebtoonBox.isChecked() and not GUI.ProcessingBox.isChecked() and not self.QualityBoxDisabled:
GUI.QualityBox.setEnabled(True)
def stripTags(self, html):
@@ -671,6 +667,7 @@ class Ui_KCC(object):
self.versionCheck = VersionThread(self)
self.conversionAlive = False
self.needClean = True
+ self.QualityBoxDisabled = False
self.GammaValue = 1.0
if sys.platform.startswith('darwin'):
self.listFontSize = 11
diff --git a/kcc/KCC_ui.py b/kcc/KCC_ui.py
index e117078..ace2b38 100644
--- a/kcc/KCC_ui.py
+++ b/kcc/KCC_ui.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC.ui'
#
-# Created: Sun Oct 06 13:47:45 2013
+# Created: Sun Oct 06 18:21:00 2013
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
@@ -270,7 +270,7 @@ class Ui_KCC(object):
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale", None))
self.WebtoonBox.setToolTip(_translate("KCC", "Enable auto-splitting of webtoons like Tower of God or Noblesse.
Pages with a low width, high height and vertical panel flow.
", None))
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode", None))
- self.NoDitheringBox.setToolTip(_translate("KCC", "
Create PNG files instead JPEG.
Output files will be ~33% smaller.
MOBI creation will be ~3x slower.
", None))
+ self.NoDitheringBox.setToolTip(_translate("KCC", "Create PNG files instead JPEG.
Output files might be smaller.
MOBI creation will be much slower.
", None))
self.NoDitheringBox.setText(_translate("KCC", "PNG output", None))
self.BorderBox.setToolTip(_translate("KCC", "Unchecked - Autodetection
Color of margins fill will be detected automatically.
Indeterminate - White
Margins will be filled with white color.
Checked - Black
Margins will be filled with black color.
", None))
self.BorderBox.setText(_translate("KCC", "W/B margins", None))
diff --git a/kcc/KCC_ui_linux.py b/kcc/KCC_ui_linux.py
index e09eab3..09bb190 100644
--- a/kcc/KCC_ui_linux.py
+++ b/kcc/KCC_ui_linux.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC-Linux.ui'
#
-# Created: Sun Oct 06 13:48:03 2013
+# Created: Sun Oct 06 18:20:50 2013
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
@@ -339,7 +339,7 @@ class Ui_KCC(object):
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale", None))
self.WebtoonBox.setToolTip(_translate("KCC", "Enable auto-splitting of webtoons like Tower of God or Noblesse.
Pages with a low width, high height and vertical panel flow.
", None))
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode", None))
- self.NoDitheringBox.setToolTip(_translate("KCC", "Create PNG files instead JPEG.
Output files will be ~33% smaller.
MOBI creation will be ~3x slower.
", None))
+ self.NoDitheringBox.setToolTip(_translate("KCC", "Create PNG files instead JPEG.
Output files might be smaller.
MOBI creation will be much slower.
", None))
self.NoDitheringBox.setText(_translate("KCC", "PNG output", None))
self.BorderBox.setToolTip(_translate("KCC", "Unchecked - Autodetection
Color of margins fill will be detected automatically.
Indeterminate - White
Margins will be filled with white color.
Checked - Black
Margins will be filled with black color.
", None))
self.BorderBox.setText(_translate("KCC", "W/B margins", None))
diff --git a/kcc/KCC_ui_osx.py b/kcc/KCC_ui_osx.py
index 18d0752..cbba06a 100644
--- a/kcc/KCC_ui_osx.py
+++ b/kcc/KCC_ui_osx.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'KCC-OSX.ui'
#
-# Created: Sun Oct 06 13:48:17 2013
+# Created: Sun Oct 06 18:21:13 2013
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
@@ -363,7 +363,7 @@ class Ui_KCC(object):
self.UpscaleBox.setText(_translate("KCC", "Stretch/Upscale", None))
self.WebtoonBox.setToolTip(_translate("KCC", "Enable auto-splitting of webtoons like Tower of God or Noblesse.
Pages with a low width, high height and vertical panel flow.
", None))
self.WebtoonBox.setText(_translate("KCC", "Webtoon mode", None))
- self.NoDitheringBox.setToolTip(_translate("KCC", "Create PNG files instead JPEG.
Output files will be ~33% smaller.
MOBI creation will be ~3x slower.
", None))
+ self.NoDitheringBox.setToolTip(_translate("KCC", "Create PNG files instead JPEG.
Output files might be smaller.
MOBI creation will be much slower.
", None))
self.NoDitheringBox.setText(_translate("KCC", "PNG output", None))
self.BorderBox.setToolTip(_translate("KCC", "Unchecked - Autodetection
Color of margins fill will be detected automatically.
Indeterminate - White
Margins will be filled with white color.
Checked - Black
Margins will be filled with black color.
", None))
self.BorderBox.setText(_translate("KCC", "W/B margins", None))