[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Color problem with LightButton

From: Jens Thoms Toerring
Subject: Re: [XForms] Color problem with LightButton
Date: Mon, 6 Jan 2020 13:40:28 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Loïc,

On Mon, Dec 30, 2019 at 01:09:52PM +0100, Loïc Plassart wrote:
> I'm new with Xforms toolkit but I use it to develop a GUI for a home
> automation system (touchscreen). Things go well! But, I would like
> to allow a few themes and it seams that main color of LightButton
> control can't be customized. Indeed, only colors for light can be
> changed. So, is it possible to change the button main color?
> Following functions can't do this:
>   - fl_set_object_color();
>   - fl_set_object_lcolor();

Unfortunately, there's no "official" mechanism to control the
color of the lightbutton except for the color of the "light"
via fl_set_object_color() (fl_set_object_lcolor() is just for
the color of the label).

The other part is always drawn in either FL_LIGHTBUTTON_TOPCOL
(which is just FL_COL1) if the mouse isn't on the button, or in
FL_LIGHTBUTTON_MCOL (defined as FL_MCOL) when the mouse is over
the button.

These color values are indices into the color table. The only
way you could manipulate the color used would be to change the
entries in the color table. The drawback is that these entries
(FL_COL1 and FL_MCOL) are also used for other objects, so they
also would be drawn with the modified colors. At the moment I've
no good idea how to get around this:-(

                        Best regards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]