Loading ui/scene_textlayout.py +2 −2 Original line number Diff line number Diff line Loading @@ -805,7 +805,7 @@ class HorizontalTextDocumentLayout(SceneTextLayout): block = block.next() if len(self.y_offset_lst) > 0: new_height = self.shrink_height - doc_margin new_height = self.shrink_height else: new_height = doc_margin if new_height > self.available_height: Loading Loading @@ -917,7 +917,7 @@ class HorizontalTextDocumentLayout(SceneTextLayout): line.setPosition(QPointF(doc_margin, y_offset + dy)) tw = line.naturalTextWidth() shrink_width = max(tw, shrink_width) self.shrink_height = max(idea_height + y_offset, self.shrink_height) #???? self.shrink_height = max(idea_height + y_offset - doc_margin, self.shrink_height) #???? y_offset += idea_height * self.line_spacing line_idx += 1 char_idx += nchar Loading ui/textitem.py +2 −4 Original line number Diff line number Diff line Loading @@ -933,13 +933,11 @@ class TextBlkItem(QGraphicsTextItem): if cond_on_alignment: mw = br.width() if br_w > mw or br_h > mh: if np.abs(br_w - mw) > 0.001 or np.abs(br_h - mh) > 0.001: P = self.padding() * 2 mw += P mh += P mw += P self.set_size(mw, mh, set_layout_maxsize=True, set_blk_size=True) # self.prepareGeometryChange() if self.under_ctrl: self.doc_size_changed.emit(self.idx) if repaint: Loading Loading
ui/scene_textlayout.py +2 −2 Original line number Diff line number Diff line Loading @@ -805,7 +805,7 @@ class HorizontalTextDocumentLayout(SceneTextLayout): block = block.next() if len(self.y_offset_lst) > 0: new_height = self.shrink_height - doc_margin new_height = self.shrink_height else: new_height = doc_margin if new_height > self.available_height: Loading Loading @@ -917,7 +917,7 @@ class HorizontalTextDocumentLayout(SceneTextLayout): line.setPosition(QPointF(doc_margin, y_offset + dy)) tw = line.naturalTextWidth() shrink_width = max(tw, shrink_width) self.shrink_height = max(idea_height + y_offset, self.shrink_height) #???? self.shrink_height = max(idea_height + y_offset - doc_margin, self.shrink_height) #???? y_offset += idea_height * self.line_spacing line_idx += 1 char_idx += nchar Loading
ui/textitem.py +2 −4 Original line number Diff line number Diff line Loading @@ -933,13 +933,11 @@ class TextBlkItem(QGraphicsTextItem): if cond_on_alignment: mw = br.width() if br_w > mw or br_h > mh: if np.abs(br_w - mw) > 0.001 or np.abs(br_h - mh) > 0.001: P = self.padding() * 2 mw += P mh += P mw += P self.set_size(mw, mh, set_layout_maxsize=True, set_blk_size=True) # self.prepareGeometryChange() if self.under_ctrl: self.doc_size_changed.emit(self.idx) if repaint: Loading