eric6/Preferences/ConfigurationPages/ConfigurationPageBase.py

changeset 7900
72b88fb20261
parent 7780
41420f82c0ac
child 7923
91e843545d9a
equal deleted inserted replaced
7899:ecf67e07b6e0 7900:72b88fb20261
54 Public method to initialize a colour selection button. 54 Public method to initialize a colour selection button.
55 55
56 @param colourKey key of the colour resource (string) 56 @param colourKey key of the colour resource (string)
57 @param button reference to a button to show the colour on (QPushButton) 57 @param button reference to a button to show the colour on (QPushButton)
58 @param prefMethod preferences method to get the colour 58 @param prefMethod preferences method to get the colour
59 @keyparam byName flag indicating to retrieve/save by colour name 59 @param byName flag indicating to retrieve/save by colour name
60 (boolean) 60 (boolean)
61 @keyparam hasAlpha flag indicating to allow alpha channel (boolean) 61 @param hasAlpha flag indicating to allow alpha channel (boolean)
62 """ 62 """
63 colour = QColor(prefMethod(colourKey)) 63 colour = QColor(prefMethod(colourKey))
64 size = button.size() 64 size = button.size()
65 pm = QPixmap(size.width() / 2, size.height() / 2) 65 pm = QPixmap(size.width() / 2, size.height() / 2)
66 pm.fill(colour) 66 pm.fill(colour)

eric ide

mercurial