GTKD - overrideBackgroundColor of Button doesn't work
TheDGuy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jun 16 00:58:56 PDT 2016
On Wednesday, 15 June 2016 at 22:34:05 UTC, Gerald wrote:
> snip...
>
>> The text color is green but the button background color is
>> still default-gray!
>
> I don't see an obvious issue with your code, I usually use CSS
> classes personally and I know that works fine because I use
> this technique all over terminix. I would suggest using the GTK
> Inspector to debug the CSS issue, it's an awesome tool for
> figuring out GTK CSS issues as it let's you change CSS on the
> fly, see what CSS is being applied to an object, etc. You can
> see how to use it at the link below:
>
> https://wiki.gnome.org/Projects/GTK%2B/Inspector
>
Do you know if this works on windows?
> Personally I just add and remove classes as needed:
>
> getStyleContext().addClass()
> getStyleContext().removeClass()
So you basically have to create 2 classes? And what would you do
if you would have to change the color randomly (for a simon says
game)? I still think it is a bad idea to claim the way with
function calls as deprecated but introducing a new system which
is not as flexible (but maybe more powerfull).
C# with Visual Studio does it, PyQT does it: Function calls.
More information about the Digitalmars-d-learn
mailing list