From 3c1b52205f183e9a2c943c5f666ed2c01db3aaf5 Mon Sep 17 00:00:00 2001 From: tassaron Date: Tue, 1 Aug 2017 17:57:39 -0400 Subject: component class now tracks colorwidgets so adding new color-selection widgets is now simple --- src/toolkit/common.py | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/toolkit/common.py') diff --git a/src/toolkit/common.py b/src/toolkit/common.py index db278c0..eba57d9 100644 --- a/src/toolkit/common.py +++ b/src/toolkit/common.py @@ -74,25 +74,6 @@ def disableWhenOpeningProject(func): return decorator -def pickColor(): - ''' - Use color picker to get color input from the user, - and return this as an RGB string and QPushButton stylesheet. - In a subclass apply stylesheet to any color selection widgets - ''' - dialog = QtWidgets.QColorDialog() - dialog.setOption(QtWidgets.QColorDialog.ShowAlphaChannel, True) - color = dialog.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() - return RGBstring, btnStyle - else: - return None, None - - def rgbFromString(string): '''Turns an RGB string like "255, 255, 255" into a tuple''' try: -- cgit v1.2.3