Fix 1 pixel sized color in color picker buttons

* On Linux, even with 1 pixel size, the button is filled entirely with the color selected
* On MacOS, the color pixmap stays at 1 pixel so we hard code the size to 16x16
This commit is contained in:
glubsy 2020-08-01 02:09:38 +02:00
parent 2620d0080c
commit d2cdcc989b
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ class ColorPickerButton(QPushButton):
self.setColor(color)
def setColor(self, color):
size = QSize(1, 1)
size = QSize(16, 16)
px = QPixmap(size)
if color is None:
size.width = 0