Exemple #1
0
 def new_undy_edit(self):
     qcolor = QColorDialog().getColor(QColor(*self.colors["undy"]),
                                      self.dialog)
     if qcolor.isValid():
         new = qcolor.getRgb()
         self.colors["undy"] = [new[0], new[1], new[2]]
         self.write_appearance_values()
Exemple #2
0
 def choose_new_indirect_colour(self):
     new_colour = QColorDialog().getColor(
         initial=self.indirect_match_colour, parent=self)
     if new_colour.isValid():
         r, g, b, _ = new_colour.getRgb()
         self.indirect_match_colour = new_colour
         self.ui.labelIndirectMatchedRow.setStyleSheet(
             'QLabel {{ background-color : rgb({},{},{})}}'.format(r, g, b))
Exemple #3
0
 def _handle_color_pick(self):
     # Color picker will popup and returns chosen color
     color = QColorDialog().getColor(QColor(*self.canvas.color))
     if color.isValid():
         self._ui.colorButton.setStyleSheet(
             f'background-color: {color.name()}')
         r, g, b, alpha = color.getRgb()
         self.canvas.set_color((r, g, b))
Exemple #4
0
 def new_undy_edit(self):
     qcolor = QColorDialog().getColor(QColor(*self.colors["undy"]), self.dialog)
     if qcolor.isValid():
         new = qcolor.getRgb()
         self.colors["undy"] = [new[0], new[1], new[2]]
         self.write_appearance_values()