From 4b1058781d39ea3e43197c559dd3631bae42b66b Mon Sep 17 00:00:00 2001
From: tassaron
Date: Fri, 16 Jun 2017 00:01:34 -0400
Subject: added width and height to color.ui
---
components/color.py | 15 ++++--
components/color.ui | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 151 insertions(+), 4 deletions(-)
(limited to 'components')
diff --git a/components/color.py b/components/color.py
index 36f3906..fda7376 100644
--- a/components/color.py
+++ b/components/color.py
@@ -37,8 +37,12 @@ class Component(__base__.Component):
# disable color #2 until non-default 'fill' option gets changed
page.lineEdit_color2.setDisabled(True)
page.pushButton_color2.setDisabled(True)
- page.spinBox_x.setValue(self.x)
- page.spinBox_x.setValue(self.y)
+ page.spinBox_x.valueChanged.connect(self.update)
+ page.spinBox_y.valueChanged.connect(self.update)
+ page.spinBox_width.setValue(
+ int(parent.settings.value("outputWidth")))
+ page.spinBox_height.setValue(
+ int(parent.settings.value("outputHeight")))
page.lineEdit_color1.textChanged.connect(self.update)
page.lineEdit_color2.textChanged.connect(self.update)
@@ -71,13 +75,16 @@ class Component(__base__.Component):
def drawFrame(self, width, height):
r, g, b = self.color1
- return self.blankFrame(width, height)
+ return Image.new("RGBA", (width, height), (r, g, b, 255))
def loadPreset(self, pr, presetName=None):
super().loadPreset(pr, presetName)
self.page.lineEdit_color1.setText('%s,%s,%s' % pr['color1'])
self.page.lineEdit_color2.setText('%s,%s,%s' % pr['color2'])
+ self.page.spinBox_x.setValue(pr['x'])
+ self.page.spinBox_y.setValue(pr['y'])
+ self.page.lineEdit_color2.setText('%s,%s,%s' % pr['color2'])
btnStyle1 = "QPushButton { background-color : %s; outline: none; }" \
% QColor(*pr['color1']).name()
@@ -93,6 +100,8 @@ class Component(__base__.Component):
'preset': self.currentPreset,
'color1': self.color1,
'color2': self.color2,
+ 'x': self.x,
+ 'y': self.y,
}
def pickColor(self, num):
diff --git a/components/color.ui b/components/color.ui
index fd427e6..9ba0649 100644
--- a/components/color.ui
+++ b/components/color.ui
@@ -172,7 +172,14 @@
-
-
+
+
+
+ 0
+ 0
+
+
+
-
@@ -286,6 +293,137 @@
+ -
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Width
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 80
+ 16777215
+
+
+
+
+ 0
+ 0
+
+
+
+ 0
+
+
+ 999999999
+
+
+ 0
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 5
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Height
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 80
+ 16777215
+
+
+
+ 999999999
+
+
+
+
+
-
--
cgit v1.2.3