Open carandraug opened 4 years ago
Not sure atm... but Andrea might have planned to have an option to change the color via dc drawing code, so you might start looking there... But since the circle/oval button produced by the code has a bit of gradienting, then you might have to do a bit of work to figure out what color helper func to use to get a nice smooth color transition.
What I have done to workaround this was:
correction = [c/255.0 for c in colour]
self._mainbuttondown = self._mainbuttondown.AdjustChannels(*correction)
which applies the colour straight into the image keeping the gradient of the button. This works because the base gradient is greyscale. I can prepare a PR if you want. It would also be nice if it was possible to have separate colours for button down and up.
Operating system: Linux wxPython version & source: 4.1.0 gtk3 (phoenix) wxWidgets 3.1.4 from PyPI Python version & source: Python 3.7 from Debian repos
The
SButton
class hasGetButtonColour
andSetButtonColour
methods which internally set the_buttoncolour
attribute. However, this is not used anywhere which means that callingSetButtonColour
does nothing. This affects all theSButton
subclasses.