diff --git a/src/Changes.cpp b/src/Changes.cpp index b49f255150..8ea11399ea 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -54,9 +54,9 @@ bool Change::isSimilarTo(Change const & change) const } -ColorCode Change::color() const +Color Change::color() const { - ColorCode color = Color_none; + Color color = Color_none; switch (author % 5) { case 0: color = Color_changedtextauthor1; @@ -74,6 +74,10 @@ ColorCode Change::color() const color = Color_changedtextauthor5; break; } + + if (deleted()) + color.mergeColor = Color_deletedtextmodifier; + return color; } diff --git a/src/Changes.h b/src/Changes.h index 09ac0aa0fe..643a7fae38 100644 --- a/src/Changes.h +++ b/src/Changes.h @@ -15,7 +15,7 @@ #ifndef CHANGES_H #define CHANGES_H -#include "ColorCode.h" +#include "Color.h" #include "support/strfwd.h" #include "support/types.h" @@ -45,7 +45,7 @@ public: /// is the change similar to the given change such that both can be merged? bool isSimilarTo(Change const & change) const; /// The color of this change on screen - ColorCode color() const; + Color color() const; /// bool changed() const { return type != UNCHANGED; } /// diff --git a/src/Color.cpp b/src/Color.cpp index 6c6e32481f..a8c583d5a8 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -203,6 +203,7 @@ ColorSet::ColorSet() { Color_changedtextauthor3, N_("changed text 3rd author"), "changedtextauthor3", "#ff0000", "changedtextauthor3" }, { Color_changedtextauthor4, N_("changed text 4th author"), "changedtextauthor4", "#aa00ff", "changedtextauthor4" }, { Color_changedtextauthor5, N_("changed text 5th author"), "changedtextauthor5", "#55aa00", "changedtextauthor5" }, + { Color_deletedtextmodifier, N_("deleted text modifier"), "deletedtextmodifier", "white", "deletedtextmodifier" }, { Color_added_space, N_("added space markers"), "added_space", "Brown", "added_space" }, { Color_topline, N_("top/bottom line"), "topline", "Brown", "topline" }, { Color_tabularline, N_("table line"), "tabularline", "black", "tabularline" }, diff --git a/src/ColorCode.h b/src/ColorCode.h index 46eeb1c26a..16e0ba33ec 100644 --- a/src/ColorCode.h +++ b/src/ColorCode.h @@ -130,12 +130,12 @@ enum ColorCode /// Math line color Color_mathline, - /// caption frame color + /// Caption frame color Color_captionframe, - /// collapsable insets text + /// Collapsable insets text Color_collapsable, - /// collapsable insets frame + /// Collapsable insets frame Color_collapsableframe, /// Inset marker background color @@ -151,22 +151,24 @@ enum ColorCode Color_added_space, /// Appendix marker color Color_appendix, - /// changebar color + /// Changebar color Color_changebar, - /// deleted text color + /// Deleted text color Color_deletedtext, - /// added text color + /// Added text color Color_addedtext, - /// changed text color author 1 + /// Changed text color author 1 Color_changedtextauthor1, - /// changed text color author 2 + /// Changed text color author 2 Color_changedtextauthor2, - /// changed text color author 3 + /// Changed text color author 3 Color_changedtextauthor3, - /// changed text color author 4 + /// Changed text color author 4 Color_changedtextauthor4, - /// changed text color author 5 + /// Changed text color author 5 Color_changedtextauthor5, + /// Deleted text modifying color + Color_deletedtextmodifier, /// Top and bottom line color Color_topline, /// Table line color diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index 4de10afe2d..f234515607 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -595,7 +595,7 @@ void RowPainter::paintLast() FontMetrics const & fm = theFontMetrics(pi_.base.bv->buffer().params().getFont()); int const length = fm.maxAscent() / 2; - ColorCode col = change.color(); + Color col = change.color(); pi_.pain.line(int(x_) + 1, yo_ + 2, int(x_) + 1, yo_ + 2 - length, col, Painter::line_solid, Painter::line_thick);