diff options
| author | Brianna Rainey | 2026-01-28 17:49:58 -0500 |
|---|---|---|
| committer | GitHub | 2026-01-28 17:49:58 -0500 |
| commit | f66eb99465c61232a7f649e66bee59504bb0e52c (patch) | |
| tree | 40d4f2e4e7cea033e4a68da025c7d91295e71cfb /src/avp/components/text.py | |
| parent | 864898419e810055b51e3a32fccb00a62aab9a6b (diff) | |
v2.2.1 - fix #74, fix #92, add optional 64th bar to Classic Visualizer, improve Conway default (#93)
* update gitignore
ignore profiling and coverage data
* F1 opens help window, create appName variable, move undostack class
* fix kaleidoscope effect, increase default Y values by +4
the increased y values allow the cells to continue animating for more than 60 minutes instead of 30 (at default 60f/t)
* update version number
* add minimumWidth to undo history window
* Classic Visualizer: option to include 64th bar
* Waveform component: fix #74 - new animation speed option
* move shared visualizer code into toolkit
* Waveform component: compress audio by default
* Waveform component: fix 100% animation speed
* new components receive random color
* update to Qt 6
* fix pushbutton stylesheet
* fix #92: replace ok/cancel with save/discard/cancel
* remove obsolete PaintColor subclass
* mv common shadow code into addShadow func
* add 3rd option of ok/cancel back to showMessage
the 3 options are:
- ok
- ok/cancel
- save/discard/cancel
* Image component: add shadow option
* small test of rgbFromString
* fix color tuple string
* test another way to get comp names from CLI
* rename component tests, add some more
* Image component: scale shadow based on resolution
* catch AttributeError if previewRender returns None
* Text component: fix blur radius only able to increase
the relativeWidgets system causes QDoubleSpinbox to only allow increases, because it really only works with integeres, so I changed the blur radius into a normal QSpinBox. I noted where the problem exists within component.py for future reference. This commit also removes an unneeded VerticalLayout from the ui file
* remove unnecessary QVBoxLayout
* paste shadow at x,y instead of using offset method
* fix tests due to shadow change
* don't print warning in connectWidget due to QFontComboBox
Diffstat (limited to 'src/avp/components/text.py')
| -rw-r--r-- | src/avp/components/text.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/avp/components/text.py b/src/avp/components/text.py index 40c981a..bee117e 100644 --- a/src/avp/components/text.py +++ b/src/avp/components/text.py @@ -5,7 +5,7 @@ import os import logging from ..component import Component -from ..toolkit.frame import FramePainter, PaintColor +from ..toolkit.frame import FramePainter, addShadow log = logging.getLogger("AVP.Components.Text") @@ -26,7 +26,6 @@ class Component(Component): self.page.comboBox_textAlign.addItem("Right") self.page.comboBox_textAlign.setCurrentIndex(int(self.alignment)) self.page.spinBox_fontSize.setValue(int(self.fontSize)) - self.page.lineEdit_title.setText(self.title) self.page.pushButton_center.clicked.connect(self.centerXY) self.page.fontComboBox_titleFont.currentFontChanged.connect( @@ -35,7 +34,7 @@ class Component(Component): # The QFontComboBox must be connected directly to the Qt Signal # which triggers the preview to update. # This unfortunately makes changing the font into a non-undoable action. - # Must be something broken in the conversion to a ComponentAction + # Fix requires updating ComponentAction to handle fonts self.trackWidgets( { @@ -173,7 +172,7 @@ class Component(Component): path.addText(x, y, font, self.title) path = outliner.createStroke(path) image.setPen(QtCore.Qt.PenStyle.NoPen) - image.setBrush(PaintColor(*self.strokeColor)) + image.setBrush(QtGui.QColor(*self.strokeColor)) image.drawPath(path) image.setFont(font) @@ -183,11 +182,7 @@ class Component(Component): # turn QImage into Pillow frame frame = image.finalize() if self.shadow: - shadImg = ImageEnhance.Contrast(frame).enhance(0.0) - shadImg = shadImg.filter(ImageFilter.GaussianBlur(self.shadBlur)) - shadImg = ImageChops.offset(shadImg, self.shadX, self.shadY) - shadImg.paste(frame, box=(0, 0), mask=frame) - frame = shadImg + frame = addShadow(frame, self.shadBlur / 10, self.shadX, self.shadY) return frame |
