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

Re: Background and theme files for gb.highlight


On Thursday, April 2nd, 2026 at 13:21, Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> wrote:
> 
> So, to get the old behaviour, you should:
> 
> - Set the Adaptative property of the theme to FALSE.
> - Save the Background color property of the theme.
> - Assign the theme to the editor.
> - Apply the saved background color to the editor Background property.
> 
> If you just apply the theme to the editor, you get the new behaviour:
> the theme is automatically adapted to the background color of the
> editor, which is by default the background color chosen by the user for
> its desktop interface.
> 
> Sorry for the inconvenience, and tell me if it works for you.

Changing this to 3.21.5 code is of no use to me as I run 3.19.6 on my systems and at work, not going anywhere in the near future.
The 3.21.5 I run is in VM and for testing stuff and changes and kind of keep up to date. I also have a few masters in VM for the same purpose.

This came to my attention when I was trying to help someone with gb.highlight combined with TextEditor on gambas.one. I posted an example theme file and some code on how to apply.
Things didn't work as expected for him until he figured out that the background was no longer in a saved theme file on the 3.21.5 he was running.

That is why I tested my Editor on 3.21.5, wondering how it would behave. Well, it doesn't behave backward compatible, that's for sure
But applications build in 3.19.6 should behave the same on 3.21.5 IMHO. That is what backward compatibility is all about, right?

So, I understood the new theme files no longer have a background property, when discussing this on gambas.one. That means there is a detectable difference between old and new behavior in the theme file.
What I then expect is that, if Gambas sees a theme file with in there a background defined (so an old theme file) it applies the old behavior and all works as intended by the developer without any mumbo jumbo from the side of the developer or a need to move to a higher version Gambas.

When I ever cross the bridge to a higher version, is when the re-coding as advised will be done.
For now, though luck if you run my applications with older theme files and implementations on 3.21.5.

I will mark this post for future reference as I will be needing it someday.

Thanks for explaining.

gbWilly


References:
Background and theme files for gb.highlightgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Background and theme files for gb.highlightBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>