diff options
-rw-r--r-- | KCC-OSX.ui | 5 | ||||
-rw-r--r-- | kcc.py | 5 | ||||
-rw-r--r-- | kcc/KCC_gui.py | 13 | ||||
-rw-r--r-- | kcc/KCC_ui_osx.py | 3 | ||||
-rwxr-xr-x | kcc/comic2ebook.py | 3 |
5 files changed, 18 insertions, 11 deletions
diff --git a/KCC-OSX.ui b/KCC-OSX.ui index 3873816..bc88ec1 100644 --- a/KCC-OSX.ui +++ b/KCC-OSX.ui @@ -581,7 +581,7 @@ <x>10</x> <y>10</y> <width>401</width> - <height>35</height> + <height>29</height> </rect> </property> <property name="font"> @@ -592,9 +592,6 @@ <bold>true</bold> </font> </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> <property name="value"> <number>0</number> </property> diff --git a/kcc.py b/kcc.py index 95f927e..727d075 100644 --- a/kcc.py +++ b/kcc.py @@ -99,6 +99,11 @@ class QApplicationMessaging(QtWidgets.QApplication): self._server.newConnection.connect(self.handleMessage) self._server.listen(self._key) + def __del__(self): + if self._memory.isAttached(): + self._memory.detach() + self._server.close() + def isRunning(self): return self._running diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 0cc6057..139a282 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -880,6 +880,8 @@ class KCCGUI(KCC_ui.Ui_KCC): GUI.ProgressBar.setValue(GUI.ProgressBar.value() + 1) elif command.isdigit(): GUI.ProgressBar.setMaximum(int(command) - 1) + GUI.BasicModeButton.hide() + GUI.AdvModeButton.hide() GUI.ProgressBar.reset() GUI.ProgressBar.show() else: @@ -909,6 +911,8 @@ class KCCGUI(KCC_ui.Ui_KCC): def hideProgressBar(self): GUI.ProgressBar.hide() + GUI.BasicModeButton.show() + GUI.AdvModeButton.show() def saveSettings(self, event): if self.conversionAlive: @@ -1017,15 +1021,18 @@ class KCCGUI(KCC_ui.Ui_KCC): if sys.platform.startswith('darwin'): self.listFontSize = 11 self.statusBarFontSize = 10 - self.statusBarStyle = 'QLabel{padding-top:5px;padding-bottom:5px;border-top:2px solid #C2C7CB}' + self.statusBarStyle = 'QLabel{padding-top:2px;padding-bottom:3px;}' + self.ProgressBar.setStyleSheet('QProgressBar{padding-top:5px;text-align:center;}') elif sys.platform.startswith('linux'): self.listFontSize = 8 self.statusBarFontSize = 8 - self.statusBarStyle = 'QLabel{padding-top:2px;padding-bottom:3px;border-top:2px solid #C2C7CB}' + self.statusBarStyle = 'QLabel{padding-top:5px;padding-bottom:3px;}' + self.statusBar.setStyleSheet('QStatusBar::item{border:0px;border-top:2px solid #C2C7CB;}') else: self.listFontSize = 9 self.statusBarFontSize = 8 - self.statusBarStyle = 'QLabel{padding-top:3px;padding-bottom:3px;border-top:2px solid #C2C7CB}' + self.statusBarStyle = 'QLabel{padding-top:3px;padding-bottom:3px}' + self.statusBar.setStyleSheet('QStatusBar::item{border:0px;border-top:2px solid #C2C7CB;}') self.profiles = { "Kindle Paperwhite": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0, diff --git a/kcc/KCC_ui_osx.py b/kcc/KCC_ui_osx.py index d4793ba..b58659d 100644 --- a/kcc/KCC_ui_osx.py +++ b/kcc/KCC_ui_osx.py @@ -239,14 +239,13 @@ class Ui_KCC(object): self.GammaSlider.setOrientation(QtCore.Qt.Horizontal) self.GammaSlider.setObjectName("GammaSlider") self.ProgressBar = QtWidgets.QProgressBar(self.Form) - self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 35)) + self.ProgressBar.setGeometry(QtCore.QRect(10, 10, 401, 29)) font = QtGui.QFont() font.setFamily("Lucida Grande") font.setPointSize(10) font.setBold(True) font.setWeight(75) self.ProgressBar.setFont(font) - self.ProgressBar.setAutoFillBackground(True) self.ProgressBar.setProperty("value", 0) self.ProgressBar.setAlignment(QtCore.Qt.AlignJustify|QtCore.Qt.AlignVCenter) self.ProgressBar.setFormat("") diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 9c990e2..f2cffac 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -584,8 +584,7 @@ def getWorkFolder(afile): path = cbx.extract(workdir) except OSError: rmtree(workdir, True) - print('UnRAR/7za not found or file failed to extract!') - sys.exit(21) + raise UserWarning("Failed to extract file.") else: rmtree(workdir, True) raise TypeError |