eric7/Preferences/ConfigurationPages/IconsPreviewDialog.py

branch
eric7
changeset 8879
159a4d6bab47
parent 8871
772712033639
child 8881
54e42bc2437a
equal deleted inserted replaced
8878:3dcbc240a940 8879:159a4d6bab47
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()

eric ide

mercurial