GNOME Bugzilla – Bug 790495
Pure contrast of change highlighting for dark theme
Last modified: 2017-12-31 22:52:24 UTC
Created attachment 363917 [details] Difficult to see line numbers on lots of monitors. For dark theme, it is difficult to distinguish line numbers for new lines, edited lines or deleted lines.
Created attachment 363924 [details] Before patch
Created attachment 363925 [details] After patch
(In reply to Vitalii from comment #0) ... > For dark theme, it is difficult to distinguish line numbers for new lines, > edited lines or deleted lines. It's not related to a deleted lines highlighting, just new and edited lines. Here is a pull-request to fix the issue: https://github.com/GNOME/meld/pull/23
Created attachment 363927 [details] [review] Patch itself
I'm not necessarily against this, but what dark theme are you using here? I test this with the only really "supported" one being Adwaita Dark, and there the contrast between the text and background is much, much greater. What I'm wondering is whether this might not need theme-specific changes, rather than changing this for all dark themes.
I've tried on "Adwaita Dark". The point is: an old version of a background is hard to look at for a long time, and the main issue is that line numbers are hardly distinguishable. On several monitors it looks OK for text, but with most of monitors I've tested it is easier to read the code for a long time with a new version of a color scheme, especially the line numbers. Probably, it's a minor case, but for 6+ weeks I have to compare lots of code, see and write down the line numbers. Please, have a look at the attached screen-shots "Before patch" and "After patch".
Created attachment 363988 [details] Adwaita Dark with base dark scheme "highlighting" I did look at them, which is why I asked the question. Here is Adwaita Dark for me with the default syntax highlighting scheme. I assume you're using some other highlight, but I don't know which one. Meld's colours for diff highlighting come from the syntax highlighting scheme, but fallback to the base scheme that you've changed. Rather than change the base scheme that changes it for everything, it would be better to change it for schemes where it's a problem.
Created attachment 364000 [details] Colorschemes comparison The issue appears on "Oblivion", "Cobalt", and "Solarized dark" (the last one looks better). If I'm not mistaken, these syntax colorschemes are taken from the outside, and to fix this for an exact colorscheme it requires either hardcoding one name/id, or creating a new highlighting style for each known colorscheme and to add a logic: "find style for syntax colorscheme, if there is no such style, load the default". For now, I think that the dark style colors in a suggested patch look better for other dark code colorschemes (see the new attachment). If it still doesn't look good for you, then a new task can be created: to enhance a generic dark style and find the best colors, which will suite all known colorschemes.
Sorry, I just got around to looking at this properly. So generally, I think I agree with your changes. However, I'm not convinced that they're quite there yet. Good things: * Your change to current-chunk-highlight is a definite win, since it improves the contrast with the inline highlighting. * The background + line-background changes for replace look good to me, and the related change to the inline highlight colour works well. Things to improve: * You've made a couple of changes to foreground here. This colour doesn't effect the text view at all; it's only used for the text colour in folder comparisons, and I think it's made those less legible (just tested with Adwaita-dark). I think these should probably just remain entirely unchanged. * While I agree that the green used for insert has better contrast, it's less nice to look at. Picking a good green tone for a dark theme is difficult, but I'd rather keep something with a deeper green tone... how do you feel about background="#123806" line-background="#245515"?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/146.
I've ended up just pushing the changes from the original patch, and then another change for the green colour. Thanks for the bug report and patch!