mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
Fix diff coloring for added and removed text in field diffs
- Update default `text_diff_added` value: red -> green - Use `text_diff_removed` and `text_diff_added` instead of `text_error` in UI
This commit is contained in:
parent
e7c12988bc
commit
0818505334
4 changed files with 8 additions and 4 deletions
|
|
@ -131,7 +131,7 @@ ui:
|
||||||
import_path: ['bold', 'blue']
|
import_path: ['bold', 'blue']
|
||||||
import_path_items: ['bold', 'blue']
|
import_path_items: ['bold', 'blue']
|
||||||
changed: ['yellow']
|
changed: ['yellow']
|
||||||
text_diff_added: ['bold', 'red']
|
text_diff_added: ['bold', 'green']
|
||||||
text_diff_removed: ['bold', 'red']
|
text_diff_removed: ['bold', 'red']
|
||||||
action_description: ['white']
|
action_description: ['white']
|
||||||
import:
|
import:
|
||||||
|
|
|
||||||
|
|
@ -1103,8 +1103,8 @@ def _field_diff(field, old, old_fmt, new, new_fmt):
|
||||||
if isinstance(oldval, str):
|
if isinstance(oldval, str):
|
||||||
oldstr, newstr = colordiff(oldval, newstr)
|
oldstr, newstr = colordiff(oldval, newstr)
|
||||||
else:
|
else:
|
||||||
oldstr = colorize("text_error", oldstr)
|
oldstr = colorize("text_diff_removed", oldstr)
|
||||||
newstr = colorize("text_error", newstr)
|
newstr = colorize("text_diff_added", newstr)
|
||||||
|
|
||||||
return f"{oldstr} -> {newstr}"
|
return f"{oldstr} -> {newstr}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,10 @@ Other changes:
|
||||||
file. :bug:`5979`
|
file. :bug:`5979`
|
||||||
- :doc:`plugins/lastgenre`: Updated and streamlined the genre whitelist and
|
- :doc:`plugins/lastgenre`: Updated and streamlined the genre whitelist and
|
||||||
canonicalization tree :bug:`5977`
|
canonicalization tree :bug:`5977`
|
||||||
|
- UI: Update default ``text_diff_added`` color from **bold red** to **bold
|
||||||
|
green.**
|
||||||
|
- UI: Use ``text_diff_added`` and ``text_diff_removed`` colors in **all** diff
|
||||||
|
comparisons.
|
||||||
|
|
||||||
2.3.1 (May 14, 2025)
|
2.3.1 (May 14, 2025)
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
||||||
|
|
@ -469,7 +469,7 @@ your configuration file that looks like this:
|
||||||
import_path: ['bold', 'blue']
|
import_path: ['bold', 'blue']
|
||||||
import_path_items: ['bold', 'blue']
|
import_path_items: ['bold', 'blue']
|
||||||
changed: ['yellow']
|
changed: ['yellow']
|
||||||
text_diff_added: ['bold', 'red']
|
text_diff_added: ['bold', 'green']
|
||||||
text_diff_removed: ['bold', 'red']
|
text_diff_removed: ['bold', 'red']
|
||||||
action_description: ['white']
|
action_description: ['white']
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue