aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authortassaron2017-06-22 19:59:31 -0400
committertassaron2017-06-22 19:59:31 -0400
commitb21a953dda4ec54d494c813af8f687d53d3675d9 (patch)
tree035751e6895bec781c5707ae7be4e6e44ab7e157 /components
parent5c74d496a960042ed4a4279328dc81e23dfdc1d9 (diff)
bugfixes
Diffstat (limited to 'components')
-rw-r--r--components/__base__.py4
-rw-r--r--components/text.py4
-rw-r--r--components/video.py1
3 files changed, 8 insertions, 1 deletions
diff --git a/components/__base__.py b/components/__base__.py
index e43a517..bdf6fdd 100644
--- a/components/__base__.py
+++ b/components/__base__.py
@@ -124,6 +124,10 @@ class Component(QtCore.QObject):
self.page = page
return page
+ def update(self):
+ super().update()
+ self.parent.drawPreview()
+
def previewRender(self, previewWorker):
width = int(previewWorker.core.settings.value('outputWidth'))
height = int(previewWorker.core.settings.value('outputHeight'))
diff --git a/components/text.py b/components/text.py
index 6c465b1..536a9ba 100644
--- a/components/text.py
+++ b/components/text.py
@@ -19,12 +19,14 @@ class Component(__base__.Component):
def widget(self, parent):
height = int(parent.settings.value('outputHeight'))
width = int(parent.settings.value('outputWidth'))
+
self.parent = parent
self.textColor = (255, 255, 255)
self.title = 'Text'
self.alignment = 1
self.fontSize = height / 13.5
- self.xPosition = width / 2
+ fm = QtGui.QFontMetrics(self.titleFont)
+ self.xPosition = width / 2 - fm.width(self.title)/2
self.yPosition = height / 2 * 1.036
page = uic.loadUi(os.path.join(
diff --git a/components/video.py b/components/video.py
index dd385b4..66c98ce 100644
--- a/components/video.py
+++ b/components/video.py
@@ -227,6 +227,7 @@ class Component(__base__.Component):
if os.path.splitext(arg)[1] in self.core.videoFormats:
self.videoPath = arg
self.scale = 100
+ self.loopVideo = True
return True
else:
print("Not a supported video format")