Commit 78789fbb authored by dmMaze's avatar dmMaze
Browse files

impl global replace & re-render

parent bb1bd8b3
Loading
Loading
Loading
Loading
+32 −9
Original line number Diff line number Diff line
@@ -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 {
@@ -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);
}
@@ -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);
}

@@ -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);
}

@@ -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;
}

+2 −0
Original line number Diff line number Diff line
@@ -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)
@@ -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()
+1 −1
Original line number Diff line number Diff line
@@ -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
+286 −62

File changed.

Preview size limit exceeded, changes collapsed.

+5 −4
Original line number Diff line number Diff line
@@ -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()
@@ -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