From 4426b0e9057909f0f752f90fddc9047b816ad7d5 Mon Sep 17 00:00:00 2001 From: tassaron Date: Mon, 22 May 2017 16:46:59 -0400 Subject: [PATCH 1/8] rm line that makes atexit raise an error I don't notice any difference in behaviour without this line --- main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/main.py b/main.py index 0e55196..cb862ac 100644 --- a/main.py +++ b/main.py @@ -185,7 +185,6 @@ class Main(QtCore.QObject): self.settings.setValue("fontSize", str(self.window.fontsizeSpinBox.value())) self.settings.setValue("xPosition", str(self.window.textXSpinBox.value())) self.settings.setValue("yPosition", str(self.window.textYSpinBox.value())) - sys.exit(0) def openInputFileDialog(self): inputDir = self.settings.value("inputDir", expanduser("~")) From 77eed58a87a4b2c79ee2fd8abffec4471ff56095 Mon Sep 17 00:00:00 2001 From: tassaron Date: Mon, 22 May 2017 16:58:05 -0400 Subject: [PATCH 2/8] make sure tempfiles get deleted --- video_thread.py | 1 + 1 file changed, 1 insertion(+) diff --git a/video_thread.py b/video_thread.py index bd832be..de508a8 100644 --- a/video_thread.py +++ b/video_thread.py @@ -124,6 +124,7 @@ class Worker(QtCore.QObject): # out_pipe.terminate() # don't terminate ffmpeg too early out_pipe.wait() print("Video file created") + self.core.deleteTempDir() self.progressBarUpdate.emit(100) self.progressBarSetText.emit('100%') self.videoCreated.emit() From 07644f03486e4812ac85839b5eaba9f8bbbf890a Mon Sep 17 00:00:00 2001 From: tassaron Date: Mon, 22 May 2017 19:42:32 -0400 Subject: [PATCH 3/8] text and visualization colour can be changed using commandline --- core.py | 13 ++++++++----- main.py | 41 ++++++++++++++++++++++++++++++++++++----- preview_thread.py | 16 ++++++++++------ video_thread.py | 13 ++++++++----- 4 files changed, 62 insertions(+), 21 deletions(-) diff --git a/core.py b/core.py index 92b0d0e..b693837 100644 --- a/core.py +++ b/core.py @@ -42,7 +42,8 @@ class Core(): else: return self.getVideoFrames(backgroundImage, preview) - def drawBaseImage(self, backgroundFile, titleText, titleFont, fontSize, alignment, xOffset, yOffset): + def drawBaseImage(self, backgroundFile, titleText, titleFont, fontSize, alignment,\ + xOffset, yOffset, textColor, visColor): if backgroundFile == '': im = Image.new("RGB", (1280, 720), "black") else: @@ -62,7 +63,7 @@ class Core(): font = titleFont font.setPointSizeF(fontSize) painter.setFont(font) - painter.setPen(QColor(255, 255, 255)) + painter.setPen(QColor(*textColor)) yPosition = yOffset @@ -86,13 +87,15 @@ class Core(): strio.seek(0) return Image.open(strio) - def drawBars(self, spectrum, image): + def drawBars(self, spectrum, image, color): imTop = Image.new("RGBA", (1280, 360)) draw = ImageDraw.Draw(imTop) + r, g, b = color + color2 = (r, g, b, 50) for j in range(0, 63): - draw.rectangle((10 + j * 20, 325, 10 + j * 20 + 20, 325 - spectrum[j * 4] * 1 - 10), fill=(255, 255, 255, 50)) - draw.rectangle((15 + j * 20, 320, 15 + j * 20 + 10, 320 - spectrum[j * 4] * 1), fill="white") + draw.rectangle((10 + j * 20, 325, 10 + j * 20 + 20, 325 - spectrum[j * 4] * 1 - 10), fill=color2) + draw.rectangle((15 + j * 20, 320, 15 + j * 20 + 10, 320 - spectrum[j * 4] * 1), fill=color) imBottom = imTop.transpose(Image.FLIP_TOP_BOTTOM) diff --git a/main.py b/main.py index cb862ac..c9c4db5 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ import preview_thread, core, video_thread class Command(QtCore.QObject): - videoTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int, str, str) + videoTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int, tuple, tuple, str, str) def __init__(self): QtCore.QObject.__init__(self) @@ -28,12 +28,36 @@ class Command(QtCore.QObject): self.parser.add_argument('-t', '--text', dest='text', help='title text', required=True) self.parser.add_argument('-f', '--font', dest='font', help='title font', required=False) self.parser.add_argument('-s', '--fontsize', dest='fontsize', help='title font size', required=False) + self.parser.add_argument('-c', '--textcolor', dest='textcolor', help='title text color', required=False) + self.parser.add_argument('-C', '--viscolor', dest='viscolor', help='visualization color', required=False) self.parser.add_argument('-x', '--xposition', dest='xposition', help='x position', required=False) self.parser.add_argument('-y', '--yposition', dest='yposition', help='y position', required=False) self.parser.add_argument('-a', '--alignment', dest='alignment', help='title alignment', required=False, type=int, choices=[0, 1, 2]) self.args = self.parser.parse_args() self.settings = QSettings('settings.ini', QSettings.IniFormat) + + # colour settings + RGBError = 'Bad RGB input (use two commas)' + self.textcolor = (255, 255, 255) + self.viscolor = (255, 255, 255) + if self.args.textcolor: + try: + r, g, b = self.args.textcolor.split(',') + except: + print(RGBError) + else: + self.textcolor = (int(r), int(g), int(b)) + + if self.args.viscolor: + try: + r, g, b = self.args.viscolor.split(',') + except: + print(RGBError) + else: + self.viscolor = (int(r), int(g), int(b)) + + # font settings if self.args.font: self.font = QFont(self.args.font) else: @@ -43,7 +67,6 @@ class Command(QtCore.QObject): self.fontsize = int(self.args.fontsize) else: self.fontsize = int(self.settings.value("fontSize", 35)) - if self.args.alignment: self.alignment = int(self.args.alignment) else: @@ -75,6 +98,8 @@ class Command(QtCore.QObject): self.alignment, self.textX, self.textY, + self.textcolor, + self.viscolor, self.args.input, self.args.output) @@ -93,9 +118,9 @@ class Command(QtCore.QObject): class Main(QtCore.QObject): - newTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int) + newTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int, tuple, tuple) processTask = QtCore.pyqtSignal() - videoTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int, str, str) + videoTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int, tuple, tuple, str, str) def __init__(self, window): @@ -106,6 +131,8 @@ class Main(QtCore.QObject): self.core = core.Core() self.settings = QSettings('settings.ini', QSettings.IniFormat) + self.textcolor = (255, 255, 255) + self.viscolor = (255, 255, 255) self.previewQueue = Queue() @@ -236,6 +263,8 @@ class Main(QtCore.QObject): self.window.alignmentComboBox.currentIndex(), self.window.textXSpinBox.value(), self.window.textYSpinBox.value(), + self.textcolor, + self.viscolor, self.window.label_input.text(), self.window.label_output.text()) @@ -257,7 +286,9 @@ class Main(QtCore.QObject): self.window.fontsizeSpinBox.value(), self.window.alignmentComboBox.currentIndex(), self.window.textXSpinBox.value(), - self.window.textYSpinBox.value()) + self.window.textYSpinBox.value(), + self.textcolor, + self.viscolor) # self.processTask.emit() def showPreviewImage(self, image): diff --git a/preview_thread.py b/preview_thread.py index 5bad653..041d39e 100644 --- a/preview_thread.py +++ b/preview_thread.py @@ -19,8 +19,9 @@ class Worker(QtCore.QObject): self.queue = queue - @pyqtSlot(str, str, QtGui.QFont, int, int, int, int) - def createPreviewImage(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset): + @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, tuple, tuple) + def createPreviewImage(self, backgroundImage, titleText, titleFont, fontSize,\ + alignment, xOffset, yOffset, textColor, visColor): # print('worker thread id: {}'.format(QtCore.QThread.currentThreadId())) dic = { "backgroundImage": backgroundImage, @@ -29,7 +30,9 @@ class Worker(QtCore.QObject): "fontSize": fontSize, "alignment": alignment, "xoffset": xOffset, - "yoffset": yOffset + "yoffset": yOffset, + "textColor" : textColor, + "visColor" : visColor } self.queue.put(dic) @@ -59,11 +62,12 @@ class Worker(QtCore.QObject): nextPreviewInformation["fontSize"], nextPreviewInformation["alignment"], nextPreviewInformation["xoffset"], - nextPreviewInformation["yoffset"]) - + nextPreviewInformation["yoffset"], + nextPreviewInformation["textColor"], + nextPreviewInformation["visColor"]) spectrum = numpy.fromfunction(lambda x: 0.008*(x-128)**2, (255,), dtype="int16") - im = self.core.drawBars(spectrum, im) + im = self.core.drawBars(spectrum, im, nextPreviewInformation["visColor"]) self._image = ImageQt(im) self._previewImage = QtGui.QImage(self._image) diff --git a/video_thread.py b/video_thread.py index de508a8..6f71d38 100644 --- a/video_thread.py +++ b/video_thread.py @@ -19,8 +19,9 @@ class Worker(QtCore.QObject): self.core = core.Core() - @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, str, str) - def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment, xOffset, yOffset, inputFile, outputFile): + @pyqtSlot(str, str, QtGui.QFont, int, int, int, int, tuple, tuple, str, str) + def createVideo(self, backgroundImage, titleText, titleFont, fontSize, alignment,\ + xOffset, yOffset, textColor, visColor, inputFile, outputFile): # print('worker thread id: {}'.format(QtCore.QThread.currentThreadId())) def getBackgroundAtIndex(i): return self.core.drawBaseImage( @@ -30,7 +31,9 @@ class Worker(QtCore.QObject): fontSize, alignment, xOffset, - yOffset) + yOffset, + textColor, + visColor) progressBarValue = 0 self.progressBarUpdate.emit(progressBarValue) @@ -97,9 +100,9 @@ class Worker(QtCore.QObject): smoothConstantUp, lastSpectrum) if imBackground != None: - im = self.core.drawBars(lastSpectrum, imBackground) + im = self.core.drawBars(lastSpectrum, imBackground, visColor) else: - im = self.core.drawBars(lastSpectrum, getBackgroundAtIndex(bgI)) + im = self.core.drawBars(lastSpectrum, getBackgroundAtIndex(bgI), visColor) if bgI < len(backgroundFrames)-1: bgI += 1 From 431b9f63048850f6e3151b1bfd8650143f50dfe7 Mon Sep 17 00:00:00 2001 From: tassaron Date: Mon, 22 May 2017 22:25:38 -0400 Subject: [PATCH 4/8] colors are configurable in the GUI any invalid RGB tuple entered will result in white --- core.py | 14 +++++++++++++ main.py | 42 +++++++++++++++++++++++--------------- main.ui | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 100 insertions(+), 18 deletions(-) diff --git a/core.py b/core.py index b693837..6981b87 100644 --- a/core.py +++ b/core.py @@ -194,3 +194,17 @@ class Core(): shell=True ) return sorted([os.path.join(self.tempDir, f) for f in os.listdir(self.tempDir)]) + + @staticmethod + def RGBFromString(string): + ''' turns an RGB string like "255, 255, 255" into a tuple ''' + try: + tup = tuple([int(i) for i in string.split(',')]) + if len(tup) != 3: + raise ValueError + for i in tup: + if i > 255 or i < 0: + raise ValueError + return tup + except: + return (255, 255, 255) diff --git a/main.py b/main.py index c9c4db5..0a37351 100644 --- a/main.py +++ b/main.py @@ -39,23 +39,23 @@ class Command(QtCore.QObject): # colour settings RGBError = 'Bad RGB input (use two commas)' - self.textcolor = (255, 255, 255) - self.viscolor = (255, 255, 255) + # load colors as tuples from a comma-separated string + self.textColor = tuple([int(i) for i in self.settings.value("textColor", '255, 255, 255').split(',')]) + self.visColor = tuple([int(i) for i in self.settings.value("visColor", '255, 255, 255').split(',')]) if self.args.textcolor: try: r, g, b = self.args.textcolor.split(',') except: print(RGBError) else: - self.textcolor = (int(r), int(g), int(b)) - + self.textColor = (int(r), int(g), int(b)) if self.args.viscolor: try: r, g, b = self.args.viscolor.split(',') except: print(RGBError) else: - self.viscolor = (int(r), int(g), int(b)) + self.visColor = (int(r), int(g), int(b)) # font settings if self.args.font: @@ -98,8 +98,8 @@ class Command(QtCore.QObject): self.alignment, self.textX, self.textY, - self.textcolor, - self.viscolor, + self.textColor, + self.visColor, self.args.input, self.args.output) @@ -114,6 +114,8 @@ class Command(QtCore.QObject): self.settings.setValue("fontSize", str(self.fontsize)) self.settings.setValue("xPosition", str(self.textX)) self.settings.setValue("yPosition", str(self.textY)) + self.settings.setValue("visColor", '%s,%s,%s' % self.visColor) + self.settings.setValue("textColor", '%s,%s,%s' % self.textColor) sys.exit(0) class Main(QtCore.QObject): @@ -123,16 +125,16 @@ class Main(QtCore.QObject): videoTask = QtCore.pyqtSignal(str, str, QFont, int, int, int, int, tuple, tuple, str, str) def __init__(self, window): - QtCore.QObject.__init__(self) # print('main thread id: {}'.format(QtCore.QThread.currentThreadId())) self.window = window self.core = core.Core() - self.settings = QSettings('settings.ini', QSettings.IniFormat) - self.textcolor = (255, 255, 255) - self.viscolor = (255, 255, 255) + + # load colors as tuples from a comma-separated string + self.textColor = core.Core.RGBFromString(self.settings.value("textColor", '255, 255, 255')) + self.visColor = core.Core.RGBFromString(self.settings.value("visColor", '255, 255, 255')) self.previewQueue = Queue() @@ -162,6 +164,8 @@ class Main(QtCore.QObject): window.label_alignment.setText("Title Options") window.label_fontsize.setText("Fontsize") window.label_title.setText("Title Text") + window.label_textColor.setText("Text color:") + window.label_visColor.setText("Visualizer color:") window.pushButton_createVideo.setText("Create Video") window.groupBox_create.setTitle("Create") window.groupBox_settings.setTitle("Settings") @@ -173,6 +177,8 @@ class Main(QtCore.QObject): window.fontsizeSpinBox.setValue(35) window.textXSpinBox.setValue(70) window.textYSpinBox.setValue(375) + window.lineEdit_textColor.setText('%s,%s,%s' % self.textColor) + window.lineEdit_visColor.setText('%s,%s,%s' % self.visColor) titleFont = self.settings.value("titleFont") if not titleFont == None: @@ -197,6 +203,8 @@ class Main(QtCore.QObject): window.textXSpinBox.valueChanged.connect(self.drawPreview) window.textYSpinBox.valueChanged.connect(self.drawPreview) window.fontsizeSpinBox.valueChanged.connect(self.drawPreview) + window.lineEdit_textColor.textChanged.connect(self.drawPreview) + window.lineEdit_visColor.textChanged.connect(self.drawPreview) self.drawPreview() @@ -206,12 +214,14 @@ class Main(QtCore.QObject): self.timer.stop() self.previewThread.quit() self.previewThread.wait() - + self.settings.setValue("titleFont", self.window.fontComboBox.currentFont().toString()) self.settings.setValue("alignment", str(self.window.alignmentComboBox.currentIndex())) self.settings.setValue("fontSize", str(self.window.fontsizeSpinBox.value())) self.settings.setValue("xPosition", str(self.window.textXSpinBox.value())) self.settings.setValue("yPosition", str(self.window.textYSpinBox.value())) + self.settings.setValue("visColor", self.window.lineEdit_visColor.text()) + self.settings.setValue("textColor", self.window.lineEdit_textColor.text()) def openInputFileDialog(self): inputDir = self.settings.value("inputDir", expanduser("~")) @@ -263,8 +273,8 @@ class Main(QtCore.QObject): self.window.alignmentComboBox.currentIndex(), self.window.textXSpinBox.value(), self.window.textYSpinBox.value(), - self.textcolor, - self.viscolor, + core.Core.RGBFromString(self.window.lineEdit_textColor.text()), + core.Core.RGBFromString(self.window.lineEdit_visColor.text()), self.window.label_input.text(), self.window.label_output.text()) @@ -287,8 +297,8 @@ class Main(QtCore.QObject): self.window.alignmentComboBox.currentIndex(), self.window.textXSpinBox.value(), self.window.textYSpinBox.value(), - self.textcolor, - self.viscolor) + core.Core.RGBFromString(self.window.lineEdit_textColor.text()), + core.Core.RGBFromString(self.window.lineEdit_visColor.text())) # self.processTask.emit() def showPreviewImage(self, image): diff --git a/main.ui b/main.ui index c500905..88d5173 100644 --- a/main.ui +++ b/main.ui @@ -275,6 +275,66 @@ + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + + 200 + 0 + + + + QFrame::NoFrame + + + + + + + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + @@ -308,8 +368,6 @@ - - From a251be0cd46d3702fcbb5cabf0ff4a348b42b66e Mon Sep 17 00:00:00 2001 From: tassaron Date: Tue, 23 May 2017 18:19:55 -0400 Subject: [PATCH 5/8] select colors more easily using QColorDialog --- main.py | 23 +++++++++++++++++++++-- main.ui | 26 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 0a37351..16697d6 100644 --- a/main.py +++ b/main.py @@ -162,10 +162,11 @@ class Main(QtCore.QObject): window.pushButton_selectBackground.setText("Select Background Image") window.label_font.setText("Title Font") window.label_alignment.setText("Title Options") + window.label_colorOptions.setText("Colors") window.label_fontsize.setText("Fontsize") window.label_title.setText("Title Text") - window.label_textColor.setText("Text color:") - window.label_visColor.setText("Visualizer color:") + window.label_textColor.setText("Text:") + window.label_visColor.setText("Visualizer:") window.pushButton_createVideo.setText("Create Video") window.groupBox_create.setTitle("Create") window.groupBox_settings.setTitle("Settings") @@ -179,6 +180,12 @@ class Main(QtCore.QObject): window.textYSpinBox.setValue(375) window.lineEdit_textColor.setText('%s,%s,%s' % self.textColor) window.lineEdit_visColor.setText('%s,%s,%s' % self.visColor) + window.pushButton_textColor.clicked.connect(lambda: self.pickColor('text')) + window.pushButton_visColor.clicked.connect(lambda: self.pickColor('vis')) + btnStyle = "QPushButton { background-color : %s; outline: none; }" % QColor(*self.textColor).name() + window.pushButton_textColor.setStyleSheet(btnStyle) + btnStyle = "QPushButton { background-color : %s; outline: none; }" % QColor(*self.visColor).name() + window.pushButton_visColor.setStyleSheet(btnStyle) titleFont = self.settings.value("titleFont") if not titleFont == None: @@ -307,6 +314,18 @@ class Main(QtCore.QObject): self.window.label_preview.setPixmap(self._previewPixmap) + def pickColor(self, colorTarget): + color = QtGui.QColorDialog.getColor() + if color.isValid(): + RGBstring = '%s,%s,%s' % (str(color.red()), str(color.green()), str(color.blue())) + btnStyle = "QPushButton { background-color : %s; outline: none; }" % color.name() + if colorTarget == 'text': + self.window.lineEdit_textColor.setText(RGBstring) + window.pushButton_textColor.setStyleSheet(btnStyle) + elif colorTarget == 'vis': + self.window.lineEdit_visColor.setText(RGBstring) + window.pushButton_visColor.setStyleSheet(btnStyle) + if len(sys.argv) > 1: # command line mode app = QtGui.QApplication(sys.argv, False) diff --git a/main.ui b/main.ui index 88d5173..12e9d04 100644 --- a/main.ui +++ b/main.ui @@ -313,6 +313,19 @@ + + + + + 32 + 32 + + + + + + + @@ -326,6 +339,19 @@ + + + + + 32 + 32 + + + + + + + From 8ddbe78128ba955bd68623376a14e6425386eb5d Mon Sep 17 00:00:00 2001 From: tassaron Date: Tue, 23 May 2017 18:54:31 -0400 Subject: [PATCH 6/8] rm duplicate code --- main.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/main.py b/main.py index 16697d6..d3a0b34 100644 --- a/main.py +++ b/main.py @@ -40,23 +40,13 @@ class Command(QtCore.QObject): # colour settings RGBError = 'Bad RGB input (use two commas)' # load colors as tuples from a comma-separated string - self.textColor = tuple([int(i) for i in self.settings.value("textColor", '255, 255, 255').split(',')]) - self.visColor = tuple([int(i) for i in self.settings.value("visColor", '255, 255, 255').split(',')]) + self.textColor = core.Core.RGBFromString(self.settings.value("textColor", '255, 255, 255')) + self.visColor = core.Core.RGBFromString(self.settings.value("visColor", '255, 255, 255')) if self.args.textcolor: - try: - r, g, b = self.args.textcolor.split(',') - except: - print(RGBError) - else: - self.textColor = (int(r), int(g), int(b)) + self.textColor = core.Core.RGBFromString(self.args.textcolor) if self.args.viscolor: - try: - r, g, b = self.args.viscolor.split(',') - except: - print(RGBError) - else: - self.visColor = (int(r), int(g), int(b)) - + self.visColor = core.Core.RGBFromString(self.args.viscolor) + # font settings if self.args.font: self.font = QFont(self.args.font) From a9ddb86e53cac397b2af5dca6d809d8bb62e11c1 Mon Sep 17 00:00:00 2001 From: tassaron Date: Tue, 23 May 2017 20:03:33 -0400 Subject: [PATCH 7/8] rm unused variable --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index d3a0b34..db306e4 100644 --- a/main.py +++ b/main.py @@ -28,8 +28,8 @@ class Command(QtCore.QObject): self.parser.add_argument('-t', '--text', dest='text', help='title text', required=True) self.parser.add_argument('-f', '--font', dest='font', help='title font', required=False) self.parser.add_argument('-s', '--fontsize', dest='fontsize', help='title font size', required=False) - self.parser.add_argument('-c', '--textcolor', dest='textcolor', help='title text color', required=False) - self.parser.add_argument('-C', '--viscolor', dest='viscolor', help='visualization color', required=False) + self.parser.add_argument('-c', '--textcolor', dest='textcolor', help='title text color in r,g,b format', required=False) + self.parser.add_argument('-C', '--viscolor', dest='viscolor', help='visualization color in r,g,b format', required=False) self.parser.add_argument('-x', '--xposition', dest='xposition', help='x position', required=False) self.parser.add_argument('-y', '--yposition', dest='yposition', help='y position', required=False) self.parser.add_argument('-a', '--alignment', dest='alignment', help='title alignment', required=False, type=int, choices=[0, 1, 2]) @@ -37,9 +37,7 @@ class Command(QtCore.QObject): self.settings = QSettings('settings.ini', QSettings.IniFormat) - # colour settings - RGBError = 'Bad RGB input (use two commas)' - # load colors as tuples from a comma-separated string + # load colours as tuples from comma-separated strings self.textColor = core.Core.RGBFromString(self.settings.value("textColor", '255, 255, 255')) self.visColor = core.Core.RGBFromString(self.settings.value("visColor", '255, 255, 255')) if self.args.textcolor: From 624ec8dca2872813789cf2d5fa32c523f4359d86 Mon Sep 17 00:00:00 2001 From: tassaron Date: Thu, 25 May 2017 12:01:03 -0400 Subject: [PATCH 8/8] improved color button ui xml --- main.ui | 174 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 93 insertions(+), 81 deletions(-) diff --git a/main.ui b/main.ui index 12e9d04..9964b72 100644 --- a/main.ui +++ b/main.ui @@ -303,55 +303,67 @@ - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + - 32 - 32 + 32 + 32 - - - - - - + + + + + + + 32 + 32 + + + + - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 32 - 32 - - - - - - - + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 32 + 32 + + + + + + + + 32 + 32 + + + + @@ -359,41 +371,41 @@ - - - - - - - 200 - 0 - - - - - 200 - 16777215 - - - - - 200 - 0 - - - - QFrame::NoFrame - - - - - - - - - - + + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + + 200 + 0 + + + + QFrame::NoFrame + + + + + + + + + + @@ -469,12 +481,12 @@ 24 + + Qt::AlignCenter + true - - Qt::AlignCenter -