}
-ColorCode Change::color() const
+Color Change::color() const
{
- ColorCode color = Color_none;
+ Color color = Color_none;
switch (author % 5) {
case 0:
color = Color_changedtextauthor1;
color = Color_changedtextauthor5;
break;
}
+
+ if (deleted())
+ color.mergeColor = Color_deletedtextmodifier;
+
return color;
}
#ifndef CHANGES_H
#define CHANGES_H
-#include "ColorCode.h"
+#include "Color.h"
#include "support/strfwd.h"
#include "support/types.h"
/// 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; }
///
{ 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" },
/// 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
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
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);