Mostly functional in the new format
This commit is contained in:
@@ -37,7 +37,7 @@ class Fragment:
|
||||
self._color = QColor()
|
||||
self._background = QColor()
|
||||
self._asis = asis
|
||||
self._left = 0
|
||||
self._indent = 0
|
||||
self._target = "word"
|
||||
return
|
||||
|
||||
@@ -243,8 +243,8 @@ class Fragment:
|
||||
def setBackground(self, color: QColor) -> None:
|
||||
self._background = color
|
||||
return
|
||||
def setLeft(self, left: int) -> None:
|
||||
self._left = left
|
||||
def setIndent(self, indent: int) -> None:
|
||||
self._indent = indent
|
||||
return
|
||||
|
||||
#
|
||||
@@ -292,8 +292,8 @@ class Fragment:
|
||||
def asis(self) -> bool:
|
||||
return self._asis
|
||||
|
||||
def left(self) -> int:
|
||||
return self._left
|
||||
def indent(self) -> int:
|
||||
return self._indent
|
||||
|
||||
class Line:
|
||||
def __init__(self) -> None:
|
||||
@@ -322,7 +322,7 @@ class Line:
|
||||
|
||||
def parseText(self, frag: Fragment) -> list[Fragment]:
|
||||
org = frag.text()
|
||||
if frag.asis():
|
||||
if frag.asis() or True:
|
||||
return [frag]
|
||||
#
|
||||
# Needed Fonts
|
||||
@@ -537,8 +537,11 @@ class Line:
|
||||
self._leading = leading
|
||||
x = 0
|
||||
for frag in self._fragments:
|
||||
if x < frag.left():
|
||||
x = frag.left()
|
||||
left = frag.indent() * 30
|
||||
if left > 0:
|
||||
print(frag.indent(), frag.text())
|
||||
if x < left:
|
||||
x = left
|
||||
#
|
||||
# We need to calculate the location to draw the
|
||||
# text. We also need to calculate the bounding Rectangle
|
||||
|
||||
Reference in New Issue
Block a user