mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix right stripes
This commit is contained in:
@@ -59,7 +59,7 @@ public class LineStatusTrackerDrawing {
|
||||
}
|
||||
|
||||
static TextAttributes getAttributesFor(final Range range) {
|
||||
final Color stripeColor = getDiffColor(range);
|
||||
final Color stripeColor = getDiffColor(range, false);
|
||||
final TextAttributes textAttributes = new TextAttributes(null, stripeColor, null, EffectType.BOXED, Font.PLAIN);
|
||||
textAttributes.setErrorStripeColor(stripeColor);
|
||||
return textAttributes;
|
||||
@@ -117,7 +117,7 @@ public class LineStatusTrackerDrawing {
|
||||
public static LineMarkerRenderer createRenderer(final Range range, final LineStatusTracker tracker) {
|
||||
return new ActiveGutterRenderer() {
|
||||
public void paint(final Editor editor, final Graphics g, final Rectangle r) {
|
||||
paintGutterFragment(editor, g, r, getDiffColor(range));
|
||||
paintGutterFragment(editor, g, r, getDiffColor(range, true));
|
||||
}
|
||||
|
||||
public void doAction(final Editor editor, final MouseEvent e) {
|
||||
@@ -258,15 +258,17 @@ public class LineStatusTrackerDrawing {
|
||||
});
|
||||
}
|
||||
|
||||
private static Color getDiffColor(Range range) {
|
||||
private static Color getDiffColor(Range range, boolean gutter) {
|
||||
final EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
|
||||
switch (range.getType()) {
|
||||
case Range.INSERTED:
|
||||
return globalScheme.getColor(EditorColors.ADDED_LINES_COLOR);
|
||||
return gutter ? globalScheme.getColor(EditorColors.ADDED_LINES_COLOR)
|
||||
: globalScheme.getAttributes(DiffColors.DIFF_INSERTED).getErrorStripeColor();
|
||||
case Range.DELETED:
|
||||
return globalScheme.getAttributes(DiffColors.DIFF_DELETED).getEffectColor();
|
||||
return globalScheme.getAttributes(DiffColors.DIFF_DELETED).getErrorStripeColor();
|
||||
case Range.MODIFIED:
|
||||
return globalScheme.getColor(EditorColors.MODIFIED_LINES_COLOR);
|
||||
return gutter ? globalScheme.getColor(EditorColors.MODIFIED_LINES_COLOR)
|
||||
: globalScheme.getAttributes(DiffColors.DIFF_MODIFIED).getErrorStripeColor();
|
||||
default:
|
||||
assert false;
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user