[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Color of the active button / toogle button
|
Hello,
<Leo's thought>
In SWT there is api to set the background of the button, but there is no api to define the color of the actively selected/focused button.
However, you could make use of a focus listener and make the actively selected button dark.
I wrote a little proof of concept snippet:
https://github.com/LeoUfimtsev/LeoSwtTests/blob/master/src/standaloneTests/LTEST_Button_dark_when_active.java
To test it you can check out the repo and run the individual java file or copy the snippet and erase line 31. (Btw, Looks nicer with SWT_GTK3=1)
Attached is a little video of the snippet in action.
So one potential solution is to include a listener somewhere and when the dark theme is activated, make buttons darker.
</Leo's thought>
<Side note>
Gtk's CSS theming does support different colors depending on state of the control.
(Active, selected, unfocused, mouse-over etc...) but this would introduce api change and may not be supported on all platforms.
</Side note>
Thank you
----- Original Message -----
> From: "Niraj Modi" <niraj.modi@xxxxxxxxxx>
> To: "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
> Sent: Wednesday, May 6, 2015 7:31:35 AM
> Subject: Re: [platform-swt-dev] Color of the active button / toogle button
>
> Hi Lars,
> On Windows we cannot change button background due to platform limitation..
> see bugs 23837 and 23837.
> This is how dark-theme button looks on Windows7:
>
>
> Not sure, the bug that you are looking for is:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=462009 - [Gtk3] Button
> background Color fix... something related to dark theme :)
>
> Regards,
> Niraj Modi
>
>
> From: Lars Vogel <lars.vogel@xxxxxxxxxxx>
> To: "Eclipse Platform SWT component developers list."
> <platform-swt-dev@xxxxxxxxxxx>
> Date: 05/06/2015 02:50 PM
> Subject: [platform-swt-dev] Color of the active button / toogle
> button
> Sent by: platform-swt-dev-bounces@xxxxxxxxxxx
>
>
>
> Hi SWT development friends,
>
> in our dark theme the background color of the active button is light, see
> screenshot. Does SWT already have API to configure this background color?
>
>
>
>
> If not do you have already a bug report for requesting this feature? I
> think I remember that we had a bug report on this, but I can't find it, so
> maybe this has been fixed or my memory tricks me.
>
> Best regards, Lars
>
> --
> Eclipse Platform UI and e4 project co-lead
> vogella GmbH CEO
>
> Haindaalwisch 17a, 22395 Hamburg
> Amtsgericht Hamburg: HRB 127058
> Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
> USt-IdNr.: DE284122352
> Fax (032) 221739404, Email: lars.vogel@xxxxxxxxxxx, Web:
> http://www.vogella.com_______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
--
Leo Ufimtsev | Intern Software Engineer @ Eclipse Team
Attachment:
Active buttons made dark.ogv
Description: video/ogg
Attachment:
Selection_014.png
Description: PNG image