66 @param checked state of the button |
66 @param checked state of the button |
67 @type bool |
67 @type bool |
68 """ |
68 """ |
69 self.__inverted = checked |
69 self.__inverted = checked |
70 |
70 |
71 if self.__inverted: |
71 styleSheet = ( |
72 styleSheet = ( |
72 f"color: {self.__backgroundColor.name()};" |
73 f"color: {self.__backgroundColor.name()};" |
73 f"background-color: {self.__foregroundColor.name()}" |
74 f"background-color: {self.__foregroundColor.name()}" |
74 if self.__inverted else |
75 ) |
75 f"color: {self.__foregroundColor.name()};" |
76 else: |
76 f"background-color: {self.__backgroundColor.name()}" |
77 styleSheet = ( |
77 ) |
78 f"color: {self.__foregroundColor.name()};" |
|
79 f"background-color: {self.__backgroundColor.name()}" |
|
80 ) |
|
81 self.iconView.viewport().setStyleSheet(styleSheet) |
78 self.iconView.viewport().setStyleSheet(styleSheet) |
82 |
79 |
83 self.on_refreshButton_clicked() |
80 self.on_refreshButton_clicked() |
84 |
81 |
85 @pyqtSlot() |
82 @pyqtSlot() |