From a71c7f2154d7fa3dcd7459c13f7a3bdd7d6ed027 Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller Date: Sat, 9 Oct 2021 18:29:23 +0200 Subject: [PATCH] Make color description "changed" rather than "added" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix for #12227 (regression). Amended by Jürgen Spitzmüller --- src/Changes.cpp | 12 ++++++------ src/Color.cpp | 16 ++++++++-------- src/ColorCode.h | 32 ++++++++++++++++---------------- src/LaTeXFeatures.cpp | 8 ++++---- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Changes.cpp b/src/Changes.cpp index 33209afbbb..1bdbbf34ff 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -73,24 +73,24 @@ Color Change::color() const Color color = Color_none; switch (author % 5) { case 0: - color = Color_addedtextauthor1; + color = Color_changedtext_workarea_author1; break; case 1: - color = Color_addedtextauthor2; + color = Color_changedtext_workarea_author2; break; case 2: - color = Color_addedtextauthor3; + color = Color_changedtext_workarea_author3; break; case 3: - color = Color_addedtextauthor4; + color = Color_changedtext_workarea_author4; break; case 4: - color = Color_addedtextauthor5; + color = Color_changedtext_workarea_author5; break; } if (deleted()) - color.mergeColor = Color_deletedtextmodifier; + color.mergeColor = Color_deletedtext_workarea_modifier; return color; } diff --git a/src/Color.cpp b/src/Color.cpp index cf297e909b..7cb520d278 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -322,14 +322,14 @@ ColorSet::ColorSet() { Color_eolmarker, N_("end-of-line marker"), "eolmarker", Brown, Brown, "eolmarker" }, { Color_appendix, N_("appendix marker"), "appendix", Brown, Brown, "appendix" }, { Color_changebar, N_("change bar"), "changebar", blue, "#86a4ff", "changebar" }, - { Color_deletedtext, N_("deleted text (output)"), "deletedtext", "#ff0000", "#ff0000", "deletedtext" }, - { Color_addedtext, N_("added text (output)"), "addedtext", "#0000ff", "#0000ff", "addedtext" }, - { Color_addedtextauthor1, N_("added text (workarea, 1st author)"), "changedtextauthor1", "#0000ff", "#86a4ff", "changedtextauthor1" }, - { Color_addedtextauthor2, N_("added text (workarea, 2nd author)"), "changedtextauthor2", "#ff00ff", "#ee86ee", "changedtextauthor2" }, - { Color_addedtextauthor3, N_("added text (workarea, 3rd author)"), "changedtextauthor3", "#ff0000", "#ea8989", "changedtextauthor3" }, - { Color_addedtextauthor4, N_("added text (workarea, 4th author)"), "changedtextauthor4", "#aa00ff", "#c371ec", "changedtextauthor4" }, - { Color_addedtextauthor5, N_("added text (workarea, 5th author)"), "changedtextauthor5", "#55aa00", "#acd780", "changedtextauthor5" }, - { Color_deletedtextmodifier, N_("deleted text modifier (workarea)"), "deletedtextmodifier", white, white, "deletedtextmodifier" }, + { Color_deletedtext_output, N_("deleted text (output)"), "deletedtext", "#ff0000", "#ff0000", "deletedtext" }, + { Color_addedtext_output, N_("added text (output)"), "addedtext", "#0000ff", "#0000ff", "addedtext" }, + { Color_changedtext_workarea_author1, N_("changed text (workarea, 1st author)"), "changedtextauthor1", "#0000ff", "#86a4ff", "changedtextauthor1" }, + { Color_changedtext_workarea_author2, N_("changed text (workarea, 2nd author)"), "changedtextauthor2", "#ff00ff", "#ee86ee", "changedtextauthor2" }, + { Color_changedtext_workarea_author3, N_("changed text (workarea, 3rd author)"), "changedtextauthor3", "#ff0000", "#ea8989", "changedtextauthor3" }, + { Color_changedtext_workarea_author4, N_("changed text (workarea, 4th author)"), "changedtextauthor4", "#aa00ff", "#c371ec", "changedtextauthor4" }, + { Color_changedtext_workarea_author5, N_("changed text (workarea, 5th author)"), "changedtextauthor5", "#55aa00", "#acd780", "changedtextauthor5" }, + { Color_deletedtext_workarea_modifier, N_("deleted text modifier (workarea)"), "deletedtextmodifier", white, white, "deletedtextmodifier" }, { Color_added_space, N_("added space markers"), "added_space", Brown, Brown, "added_space" }, { Color_tabularline, N_("table line"), "tabularline", black, Linen, "tabularline" }, { Color_tabularonoffline, N_("table on/off line"), "tabularonoffline", "#b0c4de", "#23497b", "tabularonoffline" }, diff --git a/src/ColorCode.h b/src/ColorCode.h index c7253ff641..f2f4521f17 100644 --- a/src/ColorCode.h +++ b/src/ColorCode.h @@ -182,22 +182,22 @@ enum ColorCode { Color_appendix, /// Changebar color Color_changebar, - /// Deleted text color - Color_deletedtext, - /// Added text color - Color_addedtext, - /// Added text color author 1 - Color_addedtextauthor1, - /// Added text color author 2 - Color_addedtextauthor2, - /// Added text color author 3 - Color_addedtextauthor3, - /// Added text color author 4 - Color_addedtextauthor4, - /// Added text color author 5 - Color_addedtextauthor5, - /// Deleted text modifying color - Color_deletedtextmodifier, + /// Deleted text color (output) + Color_deletedtext_output, + /// Added text color (output) + Color_addedtext_output, + /// Changed text color author 1 (workarea) + Color_changedtext_workarea_author1, + /// Changed text color author 2 (workarea) + Color_changedtext_workarea_author2, + /// Changed text color author 3 (workarea) + Color_changedtext_workarea_author3, + /// Changed text color author 4 (workarea) + Color_changedtext_workarea_author4, + /// Changed text color author 5 (workarea) + Color_changedtext_workarea_author5, + /// Deleted text modifying color (workarea) + Color_deletedtext_workarea_modifier, /// Table line color Color_tabularline, /// Table line color diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index cec1078a56..0344202c91 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -1726,11 +1726,11 @@ TexString LaTeXFeatures::getMacros() const if (mustProvide("ct-xcolor-ulem")) { streamsize const prec = macros.os().precision(2); - RGBColor cadd = rgbFromHexName(lcolor.getX11HexName(Color_addedtext)); + RGBColor cadd = rgbFromHexName(lcolor.getX11HexName(Color_addedtext_output)); macros << "\\providecolor{lyxadded}{rgb}{" << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 << "}\n"; - RGBColor cdel = rgbFromHexName(lcolor.getX11HexName(Color_deletedtext)); + RGBColor cdel = rgbFromHexName(lcolor.getX11HexName(Color_deletedtext_output)); macros << "\\providecolor{lyxdeleted}{rgb}{" << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n"; @@ -1755,11 +1755,11 @@ TexString LaTeXFeatures::getMacros() const if (!mustProvide("ct-xcolor-ulem")) { streamsize const prec = macros.os().precision(2); - RGBColor cadd = rgbFromHexName(lcolor.getX11HexName(Color_addedtext)); + RGBColor cadd = rgbFromHexName(lcolor.getX11HexName(Color_addedtext_output)); macros << "\\providecolor{lyxadded}{rgb}{" << cadd.r / 255.0 << ',' << cadd.g / 255.0 << ',' << cadd.b / 255.0 << "}\n"; - RGBColor cdel = rgbFromHexName(lcolor.getX11HexName(Color_deletedtext)); + RGBColor cdel = rgbFromHexName(lcolor.getX11HexName(Color_deletedtext_output)); macros << "\\providecolor{lyxdeleted}{rgb}{" << cdel.r / 255.0 << ',' << cdel.g / 255.0 << ',' << cdel.b / 255.0 << "}\n";