Add tooltips to color pickers

pull/357/head
nyanpasu64 2019-02-05 01:41:39 -08:00
rodzic 59df0641f8
commit 8af5c438cd
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -324,10 +324,12 @@ class BoundColorWidget(BoundWidget, qw.QWidget):
# Setup checkbox
if self.optional:
self.check = _ColorCheckBox(self, self.text)
self.check.setToolTip("Enable/Disable Color")
layout.addWidget(self.check)
# Setup colored button.
self.button = _ColorButton(self, self.text)
self.button.setToolTip("Pick Color")
layout.addWidget(self.button)
# override BoundWidget
@ -437,7 +439,8 @@ class _ColorButton(qw.QPushButton):
self.curr_color = color
if color.isValid():
qss = f"background: {color.name()};"
# Tooltips inherit our styles. Don't change their background.
qss = f"{obj_name(self)} {{ background: {color.name()}; }}"
else:
qss = ""