def setColor(self, color): if isinstance(color, _Color): self.Color = color default, lighter = color.backgroundColors() defaultT, lighterT = color.textColors() self._Color = _Color(default, lighter) self._Color.TextColor = defaultT self._Color.TextColorHover = lighterT else: self.Color = getColor(color) self._Color
def backgroundColor(self, color: [str, int, tuple, list]): self.Color.BackgroundColor, color = getColor( color), self.Color.BackgroundColor self.backgroundColorChanged.emit(color, self.Color.BackgroundColor) self.update()
def textColorHover(self, color: [str, int, tuple, list]): self.Color.TextColorHover, color = getColor( color), self.Color.TextColorHover self.textColorHoverChanged.emit(color, self.Color.TextColorHover) self.update()
def borderColor(self, color: [str, int, tuple, list]): self.Color.BorderColor, color = getColor(color), self.Color.BorderColor self.borderColorChanged.emit(color, self.Color.BorderColor) self.update()