Hi,
I’m trying to change the background color of the diff lines.
I can’t find the names of the styles needed for this change.
I copied the “classic.xml” to new name, under “Meld\share\gtksourceview-4\styles”.
When I re-load meld, it recognize the new xml file.
I’ve managed to change many styles, but cant find which are the styles that I want to change.
All built-in schemes have same “blue hues”, so it doesn’t help.
I want to change colors to “classic” (?) colors: pink for modified line and green for added line.
See desired colors below in some image from the web.
Thanks for any help,
If you only want to override the Meld-specific colours, your best option is to use the style I’ve linked above as a base, changing the parent-scheme to whatever your preferred GtkSourceView colour scheme is.
Thanks, I was able to do it.
I saw in gitlab that you are the maintainer of the project, and I don’t have a gitlab-gnome account, so I just ask here:
I thought it would be a good idea to pull-request this color scheme.
But actually it also changes the “meld:” colors, not only the syntax,
and the preferences dialog refers to “Syntax highlighting color scheme”,
so it doesn’t fit there.
Do you know/have any plan to add an option to change the “meld colors”
or just rename the description from “Syntax highlighting color scheme” to " “Color scheme” ?
Thanks again for your help.
I thought it would be a good idea to pull-request this color scheme. But actually it also changes the “meld:” colors, not only the syntax,
Adding in new schemes here is fine; the background scheme just needs broadly to match the sourceview scheme it’s paired with.
Do you know/have any plan to add an option to change the “meld colors”
or just rename the description from “Syntax highlighting color scheme” to " “Color scheme” ?
The two are so closely linked that we can’t really separate them. The syntax highlighting scheme changes foreground text colours in ways that can make the Meld colours harder to read, and dark syntax schemes need different Meld colours to work. At a technical level, it would also be very difficult to separate them.
However, our colour scheme selector is very old at this point and is definitely due for a refresh. There have been suggestions to redesign this to follow something closer to the Builder UI, which would be great.
I’ve tried to create a color scheme, where a “new” line is green, and a “removed” line is red.
But I cant find the “meld:” style for it, if possible at all.
There’s one called “meld:delete”, but I dont think it is used, as both removed/added line seem to use style of “meld:replace”.
See attached image and xml.
Is it possible at all ? maybe by some arg to to tell meld to internal use other diff method/format ?
Thanks for your help.
Meld doesn’t support this, no. The reasons are mostly historical, but basically Meld has always had a model that considers changes in files without really enforcing the diff-style mental model of one file being “old” and one being “new”, and so there’s never really such a thing as a deletion… just an addition on the other side.
I absolutely understand that this is something that might be useful to support, but right now we don’t. I don’t really have a good idea of how much work it would be to add support for this either. It might be quite easy… you could try changing get_common_theme() to return meld:delete instead of meld:insert for line and fill colours.
For reference, we do use the delete colour, but only in (from memory) version control view.