Loading ui/constants.py +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ LANG_SUPPORT_VERTICAL = [ DEFAULT_FONT_FAMILY = 'Arial' WINDOW_BORDER_WIDTH = 3 WINDOW_BORDER_WIDTH = 4 BOTTOMBAR_HEIGHT = 48 DRAG_DIR_NONE = -1 Loading ui/drawingpanel.py +2 −1 Original line number Diff line number Diff line Loading @@ -703,6 +703,7 @@ class DrawingPanel(Widget): def on_rect_deletebtn_clicked(self): self.rect_inpaint_dict = None self.canvas.image_edit_mode = ImageEditMode.RectTool if self.inpaint_mask_item.scene() == self.canvas: self.canvas.removeItem(self.inpaint_mask_item) def on_rectchecker_changed(self): Loading ui/mainwindow.py +32 −3 Original line number Diff line number Diff line Loading @@ -266,12 +266,20 @@ class MainWindow(QMainWindow): shortcutNext.activated.connect(self.shortcutNext) shortcutBefore = QShortcut(QKeySequence("A"), self) shortcutBefore.activated.connect(self.shortcutBefore) shortcutTextedit = QShortcut(QKeySequence("T"), self) shortcutTextedit.activated.connect(self.shortcutTextedit) shortcutTextblock = QShortcut(QKeySequence("W"), self) shortcutPaint = QShortcut(QKeySequence("P"), self) shortcutPaint.activated.connect(self.shortcutPaint) shortcutTextblock.activated.connect(self.shortcutTextblock) shortcutZoomIn = QShortcut(QKeySequence.StandardKey.ZoomIn, self) shortcutZoomIn.activated.connect(self.canvas.gv.scale_up_signal) shortcutZoomOut = QShortcut(QKeySequence.StandardKey.ZoomOut, self) shortcutZoomOut.activated.connect(self.canvas.gv.scale_down_signal) shortcutCtrlD = QShortcut(QKeySequence("Ctrl+D"), self) shortcutCtrlD.activated.connect(self.shortcutCtrlD) shortcutSpace = QShortcut(QKeySequence("Space"), self) shortcutSpace.activated.connect(self.shortcutSpace) def shortcutNext(self): if self.centralStackWidget.currentIndex() == 0: Loading @@ -291,10 +299,31 @@ class MainWindow(QMainWindow): row = (row - 1 + page_count) % page_count self.pageList.setCurrentRow(row) def shortcutTextedit(self): if self.centralStackWidget.currentIndex() == 0: self.bottomBar.texteditChecker.click() def shortcutTextblock(self): if self.centralStackWidget.currentIndex() == 0: if self.bottomBar.texteditChecker.isChecked(): self.bottomBar.textblockChecker.click() def shortcutPaint(self): if self.centralStackWidget.currentIndex() == 0: self.bottomBar.paintChecker.click() def shortcutCtrlD(self): if self.centralStackWidget.currentIndex() == 0: if self.drawingPanel.isVisible(): if self.drawingPanel.currentTool == self.drawingPanel.rectTool: self.drawingPanel.rectPanel.delete_btn.click() def shortcutSpace(self): if self.centralStackWidget.currentIndex() == 0: if self.drawingPanel.isVisible(): if self.drawingPanel.currentTool == self.drawingPanel.rectTool: self.drawingPanel.rectPanel.inpaint_btn.click() def setPaintMode(self): if self.bottomBar.paintChecker.isChecked(): if self.rightComicTransStackPanel.isHidden(): Loading Loading
ui/constants.py +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ LANG_SUPPORT_VERTICAL = [ DEFAULT_FONT_FAMILY = 'Arial' WINDOW_BORDER_WIDTH = 3 WINDOW_BORDER_WIDTH = 4 BOTTOMBAR_HEIGHT = 48 DRAG_DIR_NONE = -1 Loading
ui/drawingpanel.py +2 −1 Original line number Diff line number Diff line Loading @@ -703,6 +703,7 @@ class DrawingPanel(Widget): def on_rect_deletebtn_clicked(self): self.rect_inpaint_dict = None self.canvas.image_edit_mode = ImageEditMode.RectTool if self.inpaint_mask_item.scene() == self.canvas: self.canvas.removeItem(self.inpaint_mask_item) def on_rectchecker_changed(self): Loading
ui/mainwindow.py +32 −3 Original line number Diff line number Diff line Loading @@ -266,12 +266,20 @@ class MainWindow(QMainWindow): shortcutNext.activated.connect(self.shortcutNext) shortcutBefore = QShortcut(QKeySequence("A"), self) shortcutBefore.activated.connect(self.shortcutBefore) shortcutTextedit = QShortcut(QKeySequence("T"), self) shortcutTextedit.activated.connect(self.shortcutTextedit) shortcutTextblock = QShortcut(QKeySequence("W"), self) shortcutPaint = QShortcut(QKeySequence("P"), self) shortcutPaint.activated.connect(self.shortcutPaint) shortcutTextblock.activated.connect(self.shortcutTextblock) shortcutZoomIn = QShortcut(QKeySequence.StandardKey.ZoomIn, self) shortcutZoomIn.activated.connect(self.canvas.gv.scale_up_signal) shortcutZoomOut = QShortcut(QKeySequence.StandardKey.ZoomOut, self) shortcutZoomOut.activated.connect(self.canvas.gv.scale_down_signal) shortcutCtrlD = QShortcut(QKeySequence("Ctrl+D"), self) shortcutCtrlD.activated.connect(self.shortcutCtrlD) shortcutSpace = QShortcut(QKeySequence("Space"), self) shortcutSpace.activated.connect(self.shortcutSpace) def shortcutNext(self): if self.centralStackWidget.currentIndex() == 0: Loading @@ -291,10 +299,31 @@ class MainWindow(QMainWindow): row = (row - 1 + page_count) % page_count self.pageList.setCurrentRow(row) def shortcutTextedit(self): if self.centralStackWidget.currentIndex() == 0: self.bottomBar.texteditChecker.click() def shortcutTextblock(self): if self.centralStackWidget.currentIndex() == 0: if self.bottomBar.texteditChecker.isChecked(): self.bottomBar.textblockChecker.click() def shortcutPaint(self): if self.centralStackWidget.currentIndex() == 0: self.bottomBar.paintChecker.click() def shortcutCtrlD(self): if self.centralStackWidget.currentIndex() == 0: if self.drawingPanel.isVisible(): if self.drawingPanel.currentTool == self.drawingPanel.rectTool: self.drawingPanel.rectPanel.delete_btn.click() def shortcutSpace(self): if self.centralStackWidget.currentIndex() == 0: if self.drawingPanel.isVisible(): if self.drawingPanel.currentTool == self.drawingPanel.rectTool: self.drawingPanel.rectPanel.inpaint_btn.click() def setPaintMode(self): if self.bottomBar.paintChecker.isChecked(): if self.rightComicTransStackPanel.isHidden(): Loading