Loading ballontranslator/data/config/stylesheet.css +32 −9 Original line number Diff line number Diff line Loading @@ -309,12 +309,17 @@ QGroupBox { } QPushButton { max-width: 94px; /* max-width: 94px; */ height: 32px; font-size: 14px; background-color: rgba(198, 201, 207, 33%); background-color: rgba(198, 201, 207, 50%); border: 1px solid #999999; border-radius: 3px; border-radius: 4px; } NoBorderPushBtn { background-color: rgb(198, 201, 207); border: none; } QPushButton::hover { Loading Loading @@ -803,8 +808,8 @@ ClickableLabel#SearchCloseBtn { } QCheckBox#CaseSensitiveToggle::indicator { height: 28px; width: 28px; height: 24px; width: 24px; padding-top: 3px; image: url(data/icons/case-sensitive.svg); } Loading @@ -818,8 +823,8 @@ QCheckBox#CaseSensitiveToggle::indicator:checked { } QCheckBox#WholeWordToggle::indicator { height: 28px; width: 28px; height: 24px; width: 24px; image: url(data/icons/whole-word.svg); } Loading @@ -832,8 +837,8 @@ QCheckBox#WholeWordToggle::indicator:hover { } QCheckBox#RegexToggle::indicator { height: 28px; width: 28px; height: 24px; width: 24px; image: url(data/icons/regex.svg); } Loading Loading @@ -861,4 +866,22 @@ ClickableLabel#ReplaceAllBtn { min-height: 24px; } TitleBarToolBtn { padding-left: 6px; padding-right: 6px; border-style: none; font-size: 15px; color: #6d6d6f; } TitleBarToolBtn::hover { background-color: rgb(30, 147, 229); color: whitesmoke; } TitleBarToolBtn::menu-indicator { width:0px; } ballontranslator/ui/canvas.py +2 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ class Canvas(QGraphicsScene): projstate_unsaved = False proj_savestate_changed = Signal(bool) textstack_changed = Signal() def __init__(self, parent=None): super().__init__(parent) Loading Loading @@ -540,6 +541,7 @@ class Canvas(QGraphicsScene): self.setProjSaveState(True) elif self.draw_undo_stack.index() == self.saved_drawundo_step: self.setProjSaveState(False) self.textstack_changed.emit() def redo_textedit(self): self.text_undo_stack.redo() Loading ballontranslator/ui/constants.py +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ DEFAULT_FONT_FAMILY = 'Microsoft YaHei UI' WINDOW_BORDER_WIDTH = 4 BOTTOMBAR_HEIGHT = 32 TITLEBAR_HEIGHT = 26 TITLEBAR_HEIGHT = 30 PAGELIST_THUMBNAIL_MAXNUM = 100 PAGELIST_THUMBNAIL_SIZE = 48 Loading ballontranslator/ui/global_search_widget.py +286 −62 File changed.Preview size limit exceeded, changes collapsed. Show changes ballontranslator/ui/io_thread.py +5 −4 Original line number Diff line number Diff line Loading @@ -37,13 +37,13 @@ class ThreadBase(QThread): err.exec() class ImgSaveThread(ThreadBase): img_writed = Signal(str) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.im_save_list = [] def saveImg(self, save_path: str, img: QImage): self.im_save_list.append((save_path, img)) def saveImg(self, save_path: str, img: QImage, pagename_in_proj: str = ''): self.im_save_list.append((save_path, img, pagename_in_proj)) if self.job is None: self.job = self._save_img self.start() Loading @@ -52,11 +52,12 @@ class ImgSaveThread(ThreadBase): while True: if len(self.im_save_list) == 0: break save_path, img = self.im_save_list.pop(0) save_path, img, pagename_in_proj = self.im_save_list.pop(0) if isinstance(img, QImage) or isinstance(img, QPixmap): img.save(save_path) elif isinstance(img, np.ndarray): imwrite(save_path, img) self.img_writed.emit(pagename_in_proj) class ImgTransProjFileIOThread(ThreadBase): Loading Loading
ballontranslator/data/config/stylesheet.css +32 −9 Original line number Diff line number Diff line Loading @@ -309,12 +309,17 @@ QGroupBox { } QPushButton { max-width: 94px; /* max-width: 94px; */ height: 32px; font-size: 14px; background-color: rgba(198, 201, 207, 33%); background-color: rgba(198, 201, 207, 50%); border: 1px solid #999999; border-radius: 3px; border-radius: 4px; } NoBorderPushBtn { background-color: rgb(198, 201, 207); border: none; } QPushButton::hover { Loading Loading @@ -803,8 +808,8 @@ ClickableLabel#SearchCloseBtn { } QCheckBox#CaseSensitiveToggle::indicator { height: 28px; width: 28px; height: 24px; width: 24px; padding-top: 3px; image: url(data/icons/case-sensitive.svg); } Loading @@ -818,8 +823,8 @@ QCheckBox#CaseSensitiveToggle::indicator:checked { } QCheckBox#WholeWordToggle::indicator { height: 28px; width: 28px; height: 24px; width: 24px; image: url(data/icons/whole-word.svg); } Loading @@ -832,8 +837,8 @@ QCheckBox#WholeWordToggle::indicator:hover { } QCheckBox#RegexToggle::indicator { height: 28px; width: 28px; height: 24px; width: 24px; image: url(data/icons/regex.svg); } Loading Loading @@ -861,4 +866,22 @@ ClickableLabel#ReplaceAllBtn { min-height: 24px; } TitleBarToolBtn { padding-left: 6px; padding-right: 6px; border-style: none; font-size: 15px; color: #6d6d6f; } TitleBarToolBtn::hover { background-color: rgb(30, 147, 229); color: whitesmoke; } TitleBarToolBtn::menu-indicator { width:0px; }
ballontranslator/ui/canvas.py +2 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ class Canvas(QGraphicsScene): projstate_unsaved = False proj_savestate_changed = Signal(bool) textstack_changed = Signal() def __init__(self, parent=None): super().__init__(parent) Loading Loading @@ -540,6 +541,7 @@ class Canvas(QGraphicsScene): self.setProjSaveState(True) elif self.draw_undo_stack.index() == self.saved_drawundo_step: self.setProjSaveState(False) self.textstack_changed.emit() def redo_textedit(self): self.text_undo_stack.redo() Loading
ballontranslator/ui/constants.py +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ DEFAULT_FONT_FAMILY = 'Microsoft YaHei UI' WINDOW_BORDER_WIDTH = 4 BOTTOMBAR_HEIGHT = 32 TITLEBAR_HEIGHT = 26 TITLEBAR_HEIGHT = 30 PAGELIST_THUMBNAIL_MAXNUM = 100 PAGELIST_THUMBNAIL_SIZE = 48 Loading
ballontranslator/ui/global_search_widget.py +286 −62 File changed.Preview size limit exceeded, changes collapsed. Show changes
ballontranslator/ui/io_thread.py +5 −4 Original line number Diff line number Diff line Loading @@ -37,13 +37,13 @@ class ThreadBase(QThread): err.exec() class ImgSaveThread(ThreadBase): img_writed = Signal(str) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.im_save_list = [] def saveImg(self, save_path: str, img: QImage): self.im_save_list.append((save_path, img)) def saveImg(self, save_path: str, img: QImage, pagename_in_proj: str = ''): self.im_save_list.append((save_path, img, pagename_in_proj)) if self.job is None: self.job = self._save_img self.start() Loading @@ -52,11 +52,12 @@ class ImgSaveThread(ThreadBase): while True: if len(self.im_save_list) == 0: break save_path, img = self.im_save_list.pop(0) save_path, img, pagename_in_proj = self.im_save_list.pop(0) if isinstance(img, QImage) or isinstance(img, QPixmap): img.save(save_path) elif isinstance(img, np.ndarray): imwrite(save_path, img) self.img_writed.emit(pagename_in_proj) class ImgTransProjFileIOThread(ThreadBase): Loading