From a5b00f8b6fba4e7d272b411c92f97464cb87d0ae Mon Sep 17 00:00:00 2001 From: BasioMeusPuga Date: Sat, 18 Nov 2017 12:26:01 +0530 Subject: [PATCH] Cleanup --- __main__.py | 12 ++++++------ parsers/cbr.py | 8 -------- parsers/cbz.py | 8 -------- settings.py | 4 ++-- widgets.py | 4 ++-- 5 files changed, 10 insertions(+), 26 deletions(-) diff --git a/__main__.py b/__main__.py index 28f3e32..6752d93 100755 --- a/__main__.py +++ b/__main__.py @@ -38,9 +38,10 @@ ✓ Keep fontsize and margins consistent - Let page increase in length ✓ Fullscreening ✓ Remember open tabs - Special Keyboard shortcuts and view modes for QGraphicsView - Selectable background color for QGraphicsView - View and hide toolbar actions in a list + ✓ Selectable background color for QGraphicsView + ✓ View modes for QGraphicsView + ✓ View and hide toolbar actions in a list + Comic view kayboard shortcuts Record progress Pagination Set context menu for definitions and the like @@ -214,7 +215,7 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): try: layout_extra_space_per_image = space_left // num_images self.listView.setGridSize( - QtCore.QSize(default_size + layout_extra_space_per_image, 240)) + QtCore.QSize(default_size + layout_extra_space_per_image, 250)) except ZeroDivisionError: # Initial resize is ignored return @@ -414,7 +415,7 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): self.bookToolBar.colorBoxBG.setStyleSheet( 'background-color: %s' % color_name) current_profile['background'] = color_name - + elif signal_sender == 'comicBGColor': self.bookToolBar.comicBGColor.setStyleSheet( 'background-color: %s' % color_name) @@ -490,7 +491,6 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): self.format_contentView() - def format_contentView(self): # TODO # Implement line spacing diff --git a/parsers/cbr.py b/parsers/cbr.py index db34886..0b183fe 100644 --- a/parsers/cbr.py +++ b/parsers/cbr.py @@ -52,18 +52,10 @@ class ParseCBR: return None def get_contents(self): - # TODO - # CBR files containing multiple directories for multiple chapters - file_settings = { 'images_only': True} extract_path = os.path.join(self.temp_dir, self.file_md5) - contents = collections.OrderedDict() - # This is a brute force approach - # Maybe try reading from the file as everything - # matures a little bit more - contents = collections.OrderedDict() # I'm currently choosing not to keep multiple files in memory diff --git a/parsers/cbz.py b/parsers/cbz.py index 1e66e87..6456e7d 100644 --- a/parsers/cbz.py +++ b/parsers/cbz.py @@ -55,18 +55,10 @@ class ParseCBZ: return None def get_contents(self): - # TODO - # CBZ files containing multiple directories for multiple chapters - file_settings = { 'images_only': True} extract_path = os.path.join(self.temp_dir, self.file_md5) - contents = collections.OrderedDict() - # This is a brute force approach - # Maybe try reading from the file as everything - # matures a little bit more - contents = collections.OrderedDict() # I'm currently choosing not to keep multiple files in memory diff --git a/settings.py b/settings.py index 777a28d..77bf395 100644 --- a/settings.py +++ b/settings.py @@ -26,11 +26,11 @@ class Settings: 'line_spacing': 1.5} default_profile3 = { - 'font': 'Roboto', + 'font': 'Clear Sans', 'foreground': '#657b83', 'background': '#002b36', 'padding': 140, - 'font_size': 20, + 'font_size': 30, 'line_spacing': 1.5} self.default_profiles = [ diff --git a/widgets.py b/widgets.py index 857238b..2a2f624 100644 --- a/widgets.py +++ b/widgets.py @@ -27,8 +27,8 @@ class BookToolBar(QtWidgets.QToolBar): # Buttons self.fontButton = QtWidgets.QAction( - QtGui.QIcon.fromTheme('gtk-select-font'), - 'Font settings', self) + QtGui.QIcon.fromTheme('visibility'), + 'View settings', self) self.fullscreenButton = QtWidgets.QAction( QtGui.QIcon.fromTheme('view-fullscreen'), 'Fullscreen', self)