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

Re: TestStyleColor


On Tue, 6 Jan 2026 at 19:17, CD <dessere.claude@xxxxxx> wrote:

> Hello,
>
> Based on the SwitchButton source code,
> I've been working on the Style class and its constants, properties, and
> methods.
>
> Is it normal that when the DrawingArea has focus or regains focus,
> for the three components gb.gtk3, gb.qt5, and gb.qt6,
> the Style.Color property doesn't display the requested color?
>
> Is this still a GUI component issue or not?
>
> Project attached
>

I think it is what is meant by a "style"
A style is not usually a specific thing, it is an overall genre, the base
color the widget theme uses.

The widget theme adapts depending on the current state
active/inactive/focused/hovered/etc

I think by trying to set your own Style.color depending on the controls
state you are essentially doing what Style is also trying to do.
I think Style.class is more about adjusting the current widget theme
(GTK/QT) and then the widget theme does it's own thing with it. not so much
about getting the specific color you want.

I think a better description of what Style.color does is needed. the wiki
just says "Return or set the highlight color of the styled borders. "  and
it sets much more than borders in my programs, many controls Backgrounds
are adjusting to it and it's a bit ugly.

I started most of those sentences with "I think" because i am not 100%
sure, I have just also recently been looking into Style.class settings and
these are my observations.

Respects
BruceS

Follow-Ups:
Re: TestStyleColorBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
TestStyleColorCD <dessere.claude@xxxxxx>