I have a problem with changing the background color of buttons in Linux Mint 17 cinnamon. When I run the script the button stay grey but the panel gets the right colour (see jpg file). I test using python 2.7 / wxpython 3.0 and python 2.7 / wxpython 2.8. the script is working fine with Linux Mint 16 cinnamon. I also test to “compile” the script using pyInstaller under linux Mint 16 and run it under Mint 17 and still working fine under 16 and no change of color under Mint 17.
I post my issue on linux mint forum and get no reply. I tested with several different themes and it’s always the same.
Does someone have an idea on how to fix this problem or give a hint on what I should look into
I have a problem with changing the background color of buttons in
Linux Mint 17 cinnamon. When I run the script the button stay grey but
the panel gets the right colour (see jpg file).
Instead of using wx.Button, try wx.lib.agw.gradientbutton.GradientButton.
wx.Button uses the native button widget, whereas GradientButton is
painted by portable Python code.
On Thursday, August 21, 2014 4:53:06 PM UTC-7, Stephane Coint-bavarot wrote:
Hi everyone,
I have a problem with changing the background color of buttons in Linux Mint 17 cinnamon. When I run the script the button stay grey but the panel gets the right colour (see jpg file). I test using python 2.7 / wxpython 3.0 and python 2.7 / wxpython 2.8. the script is working fine with Linux Mint 16 cinnamon. I also test to “compile” the script using pyInstaller under linux Mint 16 and run it under Mint 17 and still working fine under 16 and no change of color under Mint 17.
I post my issue on linux mint forum and get no reply. I tested with several different themes and it’s always the same.
Does someone have an idea on how to fix this problem or give a hint on what I should look into
Thanks for your suggestion but the buttons are still in grey and for information the 2 frames are identical.
Regards
Stephan
···
Le samedi 23 août 2014 07:29:11 UTC+10, Nathan McCorkle a écrit :
There’s some info that says to use a panel to ensure cross-platform looks the same… do either of the frames look different in this modified file?
On Thursday, August 21, 2014 4:53:06 PM UTC-7, Stephane Coint-bavarot wrote:
Hi everyone,
I have a problem with changing the background color of buttons in Linux Mint 17 cinnamon. When I run the script the button stay grey but the panel gets the right colour (see jpg file). I test using python 2.7 / wxpython 3.0 and python 2.7 / wxpython 2.8. the script is working fine with Linux Mint 16 cinnamon. I also test to “compile” the script using pyInstaller under linux Mint 16 and run it under Mint 17 and still working fine under 16 and no change of color under Mint 17.
I post my issue on linux mint forum and get no reply. I tested with several different themes and it’s always the same.
Does someone have an idea on how to fix this problem or give a hint on what I should look into
With the GradientButton, I’m able to change the background colour (like in the attached file) !!
I’ll check if I could still do all the customization I’ve done with wx.Button.
One difference is with wx.Button the text is in black and in GradientButton it’s white.
thanks for having taking time for the advice.
Any way I’m still wondering with wx.button no more worked.
Regards
Stephan
···
Le vendredi 22 août 2014 23:35:23 UTC+10, Anders Munch a écrit :
Stephane Coint-bavarot wrote:
Hi everyone,
I have a problem with changing the background color of buttons in
Linux Mint 17 cinnamon. When I run the script the button stay grey but
the panel gets the right colour (see jpg file).
Instead of using wx.Button, try wx.lib.agw.gradientbutton.GradientButton.
wx.Button uses the native button widget, whereas GradientButton is
On 23 August 2014 11:10, Stephane Coint-bavarot wrote:
Hi Anders,
With the GradientButton, I’m able to change the background colour (like in the attached file) !!
I’ll check if I could still do all the customization I’ve done with wx.Button.
One difference is with wx.Button the text is in black and in GradientButton it’s white.
If you want something closer to native appearance, you should try wx.lib.buttons.GenButton (and its friends). I’m sure it will do what you ask and will look less out of place than GradientButton.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
I would think the reason is that under that version of Linux Mint, the
native button is not allowed to be anything other than the default grey.
Using wxButton means using the native widget, so whatever the OS says is
the final word on what the widgets can look like. In fact, one might argue
that you should not make a button green in that version of Linux Mint,
because you are breaking the native look and feel (some people feel one
ought not to do that).
···
On Sat, Aug 23, 2014 at 5:10 AM, Stephane Coint-bavarot < stephan.coint@gmail.com> wrote:
Any way I'm still wondering with wx.button no more worked.
Le samedi 23 août 2014 21:43:38 UTC+10, Infinity77 a écrit :
Hi,
On 23 August 2014 11:10, Stephane Coint-bavarot wrote:
Hi Anders,
With the GradientButton, I’m able to change the background colour (like in the attached file) !!
I’ll check if I could still do all the customization I’ve done with wx.Button.
One difference is with wx.Button the text is in black and in GradientButton it’s white.
If you want something closer to native appearance, you should try wx.lib.buttons.GenButton (and its friends). I’m sure it will do what you ask and will look less out of place than GradientButton.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
You post make sense: may be what was allowed in mint 16 (do not follow the theme) are no more allowed in mint 17. I will update this way my post on the Mint forum and see if it ring a bell to someone in the Mint community.
Regards
Stephan
···
Le dimanche 24 août 2014 00:25:11 UTC+10, Che M a écrit :
On Sat, Aug 23, 2014 at 5:10 AM, Stephane Coint-bavarot stepha...@gmail.com wrote:
Any way I’m still wondering with wx.button no more worked.
I would think the reason is that under that version of Linux Mint, the native button is not allowed to be anything other than the default grey. Using wxButton means using the native widget, so whatever the OS says is the final word on what the widgets can look like. In fact, one might argue that you should not make a button green in that version of Linux Mint, because you are breaking the native look and feel (some people feel one ought not to do that).
I dig this idea of a more authoritative theme and inside the theme, I remove the button.rc file and my button get the background colour I wanted !! (I also lost other aspects like relief) but now I know the cause.
Regards
···
Le dimanche 24 août 2014 17:24:53 UTC+10, Stephane Coint-bavarot a écrit :
Hi,
You post make sense: may be what was allowed in mint 16 (do not follow the theme) are no more allowed in mint 17. I will update this way my post on the Mint forum and see if it ring a bell to someone in the Mint community.
Regards
Stephan
Le dimanche 24 août 2014 00:25:11 UTC+10, Che M a écrit :
On Sat, Aug 23, 2014 at 5:10 AM, Stephane Coint-bavarot stepha...@gmail.com wrote:
Any way I’m still wondering with wx.button no more worked.
I would think the reason is that under that version of Linux Mint, the native button is not allowed to be anything other than the default grey. Using wxButton means using the native widget, so whatever the OS says is the final word on what the widgets can look like. In fact, one might argue that you should not make a button green in that version of Linux Mint, because you are breaking the native look and feel (some people feel one ought not to do that).
With the GradientButton, I'm able to change the background colour (like in the attached file) !!
I'll check if I could still do all the customization I've done with wx.Button.
One difference is with wx.Button the text is in black and in GradientButton it's white.
thanks for having taking time for the advice.
Any way I'm still wondering with wx.button no more worked.
I wonder if this is a GTK+ issue on Mint 17 Cinnamon.
You might want to try the generic button in wx.lib.buttons, that one works for me on LM 17 Cinnamon.