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

Re: Background and theme files for gb.highlight


Le 02/04/2026 à 12:55, gbWilly a écrit :
It came to my attention that Background in a themes file is no longer applied to my TextEditor control in Gambas 3.21.5 This really sucks big time. The application is build in 3.19.6 and runs fine there shows all as I like and want it.

> [...]

The reason of the change is the new syntax highlighting system.

There are three points that must be taken into account:

1) The TextHighlighterTheme class has now an explicit 'Background' property, that is filled by the "Background" entry of the theme file if it exists.

2) The TextHighlighterTheme adapts automatically to a dark background unless its 'Adaptive' property is set to FALSE (the old behaviour).

3) The background color of the TextEditor control is now prioritary, and is applied to the theme when the Theme property is set, so that the theme can adapt to that background color.

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.

--
Benoît Minisini.


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