aboutsummaryrefslogtreecommitdiffstats
path: root/components/text.py
diff options
context:
space:
mode:
Diffstat (limited to 'components/text.py')
-rw-r--r--components/text.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/components/text.py b/components/text.py
index 6cdc0dd..f8ef7b3 100644
--- a/components/text.py
+++ b/components/text.py
@@ -9,8 +9,11 @@ from . import __base__
class Component(__base__.Component):
'''Title Text'''
- def __init__(self):
- super().__init__()
+
+ modified = QtCore.pyqtSignal(int, dict)
+
+ def __init__(self, *args):
+ super().__init__(*args)
self.titleFont = QFont()
def widget(self, parent):
@@ -31,7 +34,7 @@ class Component(__base__.Component):
page.comboBox_textAlign.addItem("Right")
page.lineEdit_textColor.setText('%s,%s,%s' % self.textColor)
- page.pushButton_textColor.clicked.connect(lambda: self.pickColor())
+ page.pushButton_textColor.clicked.connect(self.pickColor)
btnStyle = "QPushButton { background-color : %s; outline: none; }" \
% QColor(*self.textColor).name()
page.pushButton_textColor.setStyleSheet(btnStyle)
@@ -62,6 +65,7 @@ class Component(__base__.Component):
self.textColor = self.RGBFromString(
self.page.lineEdit_textColor.text())
self.parent.drawPreview()
+ super().update()
def getXY(self):
'''Returns true x, y after considering alignment settings'''
@@ -78,7 +82,9 @@ class Component(__base__.Component):
x = self.xPosition - offset
return x, self.yPosition
- def loadPreset(self, pr):
+ def loadPreset(self, pr, presetName=None):
+ super().loadPreset(pr, presetName)
+
self.page.lineEdit_title.setText(pr['title'])
font = QFont()
font.fromString(pr['titleFont'])
@@ -94,6 +100,7 @@ class Component(__base__.Component):
def savePreset(self):
return {
+ 'preset': self.currentPreset,
'title': self.title,
'titleFont': self.titleFont.toString(),
'alignment': self.alignment,
@@ -119,7 +126,7 @@ class Component(__base__.Component):
def addText(self, width, height):
x, y = self.getXY()
- im = Image.new("RGBA", (width, height), (0, 0, 0, 0))
+ im = self.blankFrame(width, height)
image = ImageQt(im)
painter = QPainter(image)
t'>refactor: disable `xterm` blinking cursorkj_sh6041-0/+1 2025-12-29refactor: use hexadecimal workspace namingkj_sh6041-1/+6 2025-12-29refactor: go back to less-volatile `.xml` fileskj_sh60419-748/+0 f08c428f678dca0e5d82476340638b0b31f5cc0e was a mistake 2025-12-29kj-gitbot: .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xmlkj_sh6041-1/+1 2025-12-29kj-gitbot: .config/xfce4/xfconf/xfce-perchannel-xml/thunar.xmlkj_sh6041-1/+1 2025-12-29refactor: thunar.xmlkj_sh6041-1/+1 2025-12-29refactor: add all xfce4 `.xml` fileskj_sh60421-58/+748 2025-12-29feat: add more of xfce4 config to this repokj_sh6043-1/+296 2025-12-29refactor: remove redundant configkj_sh6041-3/+0 2025-12-28refactor: fish 4.3 changeskj_sh6043-40/+63 fish update message that prompted this change: fish: upgraded to version 4.3: * Color variables are no longer set in universal scope by default. Migrated them to global variables set in ~/.config/fish/conf.d/fish_frozen_theme.fish To restore syntax highlighting in other fish sessions, please restart them. * The fish_key_bindings variable is no longer set in universal scope by default. Migrated it to a global variable set in ~/.config/fish/conf.d/fish_frozen_key_bindings.fish See also the release notes (type `help relnotes`). 2025-12-28refactor: consolidate changes to git-prompts/kj_sh604.zshkj_sh6043-66/+45 2025-12-28refactor: better fish-style pwd for zshkj_sh6041-1/+44