Adds four new styling options to customize the colors in the compiler tab to address issue #1376. When the values are not set by a colorscheme the previously hardcoded colors will be used.
A minor drawback is that the few lines in the compiler tab that were using the GTK default foreground color don't do that anymore and are by default black now (but also themable). You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1377
-- Commit Summary --
* make message window themable * added documentation for message window theme options
-- File Changes --
M doc/geany.txt (27) M src/highlighting.c (28) M src/highlighting.h (4) M src/msgwindow.c (43)
-- Patch Links --
https://github.com/geany/geany/pull/1377.patch https://github.com/geany/geany/pull/1377.diff
+1 for unhardcoding these colours, but I think it would be better to use GTK+ theming for this. The colour schemes are only supposed to affect the Scintilla editor widget. In other places where we affect the other widgets (ex. tab label colour, search entry background, etc) we already use GTK+ themes. It may even be possible to re-use the colours from GTK+ itself, like using the warning, error, info, and other colours used by GtkInfoBar, so that native dark or light GTK+ themes "just work" out of the box without having to futz with a whole other colour scheme system.
I agree with @codebrainz. It might be harder to do than e.g. the tab labels, because I don't think it's possible to set names/classes on treeveiw cells, but it's likely possible to still query the theme.
As @codebrainz mentioned, it makes it possible to play nice with the theme, and even if we didn't re-use some style that already exists (even though it'd be likely better if possible), because a theme could (theoretically) provide the Geany-specific bits itself to blend perfectly.
Don't agree with using the theme (at least as proposed above).
While at first glance it might seem nice to have the themes provide the styling, in reality they won't provide a `Geany-compiler-error-colour` or equivalent. So we would have to use standard colours if it was to follow the theme.
Unfortunately standard warning and error colours are, as @codebrainz said, designed for large slabs of colour, and not for fine text, so they may not work in that context. In fact my [dark theme](https://github.com/linuxmint/mint-y-theme/blob/d1bdb934f1c7a7e709d134f1dcdca...) sets warning colour to black, NSFW for dark and warning you say, but it then changes the background to a lighter warning or error colour, thus showing it in a larger slab. So Geany would have to be changed to set both the colour and the row background in the treeview rows to use this in Geany, although it will be pretty intrusive on a dark theme to have brightly coloured row backgrounds in the compiler window..
So the user is left having to learn how to edit a local modification to themes in either GTKrc or GTK-not-quite-really-CSS, depending on the version of GTK in use, instead of a file format controlled by Geany and so not likely to change.
I can confirm the problem, having only recently switched to a dark theme and the distro being Mint, its greenish, so red text is difficult to read against the background (and my colour acuity is (just) classified as safe, pity the 10% of males with real colour blindness).
So since it is a real problem (I have it :smile: ) I propose that we wait for a bit and see if a viable themes based pull request emerges, if not we commit this fairly simple solution as an interim (assuming it works, not tested yet) with an issue to change it to using themes.
I actually didn't realize that there was already the option to customize some colors using the GTK theme, which is why I did it using colorschemes.
I agree that using the GTK theme would be better, as it is more consistent with how geany works at the moment (-> as codebrainz pointed out: colorschemes for the editor, gtkrc for the other widgets). While it is true that no theme will provide the colors for those specific styles, this is also the case for all the other widgets that are at styled using geany.gtkrc (tab foregrounds, etc).
Additionally, the current implementation only changes the foreground color according to the colorscheme, whereas the background color is still defined by GTK, meaning that using a dark colorscheme and a light GTK theme or vice versa will again lead to unreadable messages.
I changed the fix to load the colors from the GTK theme, should I make a new pull request for it or update this one?
Since there is a disagreement about which is the right way to do it, probably better to make a separate PR so they can be compared.
Note, see #1380 for a pointer to how notebook tab colours are "themed".
See #1382
Is it OK if I close this version? I was a bit stupid and used the master branch for it, now I can't make new branches without these changes.
@Rakksor sure, its your pull request, but I'll push the `close and comment` for you.
Closed #1377.
Thanks :grinning:
Superseded by #1382 which includes the important part of this PR (b53143a12c074abc23271a8d9a7470f9f8d37102).
github-comments@lists.geany.org