Commit 72caedb6 authored by dmMaze's avatar dmMaze
Browse files

fix #896

parent 3e25cab1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -151,9 +151,7 @@ class TextAdvancedFormatPanel(PanelArea):
                self.tr("Distance")
            ]
        )
        self.linespacing_type_combobox.activated.connect(
            lambda:  self.on_format_changed('line_spacing_type', self.linespacing_type_combobox.currentIndex)
        )
        self.linespacing_type_combobox.activated.connect(self.on_linespacing_type_changed)
        linespacing_type_label = SmallParamLabel(self.tr('Line Spacing Type'))
        linespacing_type_layout = QHBoxLayout()
        linespacing_type_layout.addWidget(linespacing_type_label)
@@ -195,6 +193,8 @@ class TextAdvancedFormatPanel(PanelArea):
        TEXT_ADVANCED_PANEL_MAXH = 300
        self.setFixedHeight(min(TEXT_ADVANCED_PANEL_MAXH, self.scrollContent.height()))

    def on_linespacing_type_changed(self):
        self.on_format_changed('line_spacing_type', self.linespacing_type_combobox.currentIndex())

    def set_active_format(self, font_format: FontFormat):
        self.active_format = font_format
+1 −1
Original line number Diff line number Diff line
@@ -826,7 +826,7 @@ class TextBlkItem(QGraphicsTextItem):
            gradient = self.get_text_gradient()
            cfmt.setForeground(gradient)
        else:
            cfmt.setForeground(QColor(*self.fontformat.frgb))
            cfmt.setForeground(QColor(*[int(c) for c in self.fontformat.frgb]))

        self.set_cursor_cfmt(cursor, cfmt, True)
        self._after_set_ffmt(cursor, repaint_background, restore_cursor, **after_kwargs)