Loading ballontranslator/ui/drawingpanel.py +0 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,6 @@ class InpaintPanel(Widget): layout = QVBoxLayout(self) layout.setAlignment(Qt.AlignmentFlag.AlignTop) layout.addLayout(thickness_layout) layout.addWidget(inpainter_panel) layout.setSpacing(20) self.vlayout = layout Loading Loading @@ -182,7 +181,6 @@ class RectPanel(Widget): layout = QVBoxLayout(self) layout.setAlignment(Qt.AlignmentFlag.AlignTop) layout.addLayout(hlayout) layout.addWidget(inpainter_panel) layout.addLayout(self.btnlayout) layout.setSpacing(20) self.vlayout = layout Loading ballontranslator/ui/mainwindow.py +13 −18 Original line number Diff line number Diff line Loading @@ -36,18 +36,17 @@ class MainWindow(QMainWindow): def __init__(self, app: QApplication, open_dir='', *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.setWindowFlags(Qt.WindowType.FramelessWindowHint) constants.LDPI = QGuiApplication.primaryScreen().logicalDotsPerInch() self.setWindowFlags(Qt.WindowType.FramelessWindowHint) self.app = app self.imsave_thread = ImgSaveThread() self.setupUi() self.setupConfig() self.setupShortcuts() self.showMaximized() self.imsave_thread = ImgSaveThread() if open_dir != '' and osp.exists(open_dir): self.openDir(open_dir) elif self.config.open_recent_on_startup: Loading @@ -56,21 +55,7 @@ class MainWindow(QMainWindow): if osp.exists(proj_dir): self.openDir(proj_dir) textblock_mode = self.config.imgtrans_textblock self.bottomBar.texteditChecker.click() self.bottomBar.paintChecker.click() if self.config.imgtrans_textedit: if textblock_mode: self.bottomBar.textblockChecker.setChecked(True) self.bottomBar.texteditChecker.click() elif not self.config.imgtrans_paintmode: self.bottomBar.paintChecker.click() self.comicTransSplitter.setStretchFactor(2, 0.5) self.comicTransSplitter.setStretchFactor(1, 10) def setupUi(self): # screen_size = QApplication.desktop().screenGeometry().size() screen_size = QGuiApplication.primaryScreen().geometry().size() self.setMinimumWidth(screen_size.width() // 2) Loading Loading @@ -141,6 +126,8 @@ class MainWindow(QMainWindow): mainVBoxLayout.setSpacing(0) self.mainvlayout = mainVBoxLayout self.comicTransSplitter.setStretchFactor(1, 10) def setupConfig(self): with open(STYLESHEET_PATH, "r", encoding='utf-8') as f: self.setStyleSheet(f.read()) Loading Loading @@ -191,6 +178,14 @@ class MainWindow(QMainWindow): self.configPanel.let_fntstroke_combox.setCurrentIndex(self.config.let_fntstroke_flag) self.configPanel.let_fntcolor_combox.setCurrentIndex(self.config.let_fntcolor_flag) textblock_mode = self.config.imgtrans_textblock if self.config.imgtrans_textedit: if textblock_mode: self.bottomBar.textblockChecker.setChecked(True) self.bottomBar.texteditChecker.click() elif self.config.imgtrans_paintmode: self.bottomBar.paintChecker.click() def setupImgTransUI(self): self.centralStackWidget.setCurrentIndex(0) if self.leftBar.showPageListLabel.checkState() == 2: Loading Loading
ballontranslator/ui/drawingpanel.py +0 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,6 @@ class InpaintPanel(Widget): layout = QVBoxLayout(self) layout.setAlignment(Qt.AlignmentFlag.AlignTop) layout.addLayout(thickness_layout) layout.addWidget(inpainter_panel) layout.setSpacing(20) self.vlayout = layout Loading Loading @@ -182,7 +181,6 @@ class RectPanel(Widget): layout = QVBoxLayout(self) layout.setAlignment(Qt.AlignmentFlag.AlignTop) layout.addLayout(hlayout) layout.addWidget(inpainter_panel) layout.addLayout(self.btnlayout) layout.setSpacing(20) self.vlayout = layout Loading
ballontranslator/ui/mainwindow.py +13 −18 Original line number Diff line number Diff line Loading @@ -36,18 +36,17 @@ class MainWindow(QMainWindow): def __init__(self, app: QApplication, open_dir='', *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.setWindowFlags(Qt.WindowType.FramelessWindowHint) constants.LDPI = QGuiApplication.primaryScreen().logicalDotsPerInch() self.setWindowFlags(Qt.WindowType.FramelessWindowHint) self.app = app self.imsave_thread = ImgSaveThread() self.setupUi() self.setupConfig() self.setupShortcuts() self.showMaximized() self.imsave_thread = ImgSaveThread() if open_dir != '' and osp.exists(open_dir): self.openDir(open_dir) elif self.config.open_recent_on_startup: Loading @@ -56,21 +55,7 @@ class MainWindow(QMainWindow): if osp.exists(proj_dir): self.openDir(proj_dir) textblock_mode = self.config.imgtrans_textblock self.bottomBar.texteditChecker.click() self.bottomBar.paintChecker.click() if self.config.imgtrans_textedit: if textblock_mode: self.bottomBar.textblockChecker.setChecked(True) self.bottomBar.texteditChecker.click() elif not self.config.imgtrans_paintmode: self.bottomBar.paintChecker.click() self.comicTransSplitter.setStretchFactor(2, 0.5) self.comicTransSplitter.setStretchFactor(1, 10) def setupUi(self): # screen_size = QApplication.desktop().screenGeometry().size() screen_size = QGuiApplication.primaryScreen().geometry().size() self.setMinimumWidth(screen_size.width() // 2) Loading Loading @@ -141,6 +126,8 @@ class MainWindow(QMainWindow): mainVBoxLayout.setSpacing(0) self.mainvlayout = mainVBoxLayout self.comicTransSplitter.setStretchFactor(1, 10) def setupConfig(self): with open(STYLESHEET_PATH, "r", encoding='utf-8') as f: self.setStyleSheet(f.read()) Loading Loading @@ -191,6 +178,14 @@ class MainWindow(QMainWindow): self.configPanel.let_fntstroke_combox.setCurrentIndex(self.config.let_fntstroke_flag) self.configPanel.let_fntcolor_combox.setCurrentIndex(self.config.let_fntcolor_flag) textblock_mode = self.config.imgtrans_textblock if self.config.imgtrans_textedit: if textblock_mode: self.bottomBar.textblockChecker.setChecked(True) self.bottomBar.texteditChecker.click() elif self.config.imgtrans_paintmode: self.bottomBar.paintChecker.click() def setupImgTransUI(self): self.centralStackWidget.setCurrentIndex(0) if self.leftBar.showPageListLabel.checkState() == 2: Loading