mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
merge: fix rendering for resolved changes in merge
follow-up 95384fd370
This commit is contained in:
@@ -222,6 +222,7 @@ public class DiffDrawUtil {
|
||||
@NotNull
|
||||
private static LineSeparatorRenderer createDiffLineRenderer(@NotNull final Editor editor,
|
||||
@NotNull final TextDiffType type,
|
||||
@NotNull SeparatorPlacement placement,
|
||||
final boolean doubleLine,
|
||||
final boolean resolved) {
|
||||
return new LineSeparatorRenderer() {
|
||||
@@ -230,6 +231,7 @@ public class DiffDrawUtil {
|
||||
// TODO: change LineSeparatorRenderer interface ?
|
||||
Rectangle clip = g.getClipBounds();
|
||||
x2 = clip.x + clip.width;
|
||||
if (placement == SeparatorPlacement.TOP) y++;
|
||||
drawChunkBorderLine((Graphics2D)g, x1, x2, y, type.getColor(editor), doubleLine, resolved);
|
||||
}
|
||||
};
|
||||
@@ -504,7 +506,7 @@ public class DiffDrawUtil {
|
||||
@NotNull
|
||||
public LineMarkerBuilder withDefaultRenderer(boolean doubleLine) {
|
||||
assert type != null;
|
||||
this.renderer = createDiffLineRenderer(editor, type, doubleLine, resolved);
|
||||
this.renderer = createDiffLineRenderer(editor, type, placement, doubleLine, resolved);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class DiffLineMarkerRenderer implements LineMarkerRendererEx {
|
||||
g2.setColor(ignoredBackgroundColor ? myDiffType.getIgnoredColor(editor) : color);
|
||||
g2.fillRect(x1, y1, x2 - x1, y2 - y1);
|
||||
} else {
|
||||
DiffDrawUtil.drawChunkBorderLine(g2, x1, x2, y1 - 1, color, false, myResolved);
|
||||
DiffDrawUtil.drawChunkBorderLine(g2, x1, x2, y1, color, false, myResolved);
|
||||
DiffDrawUtil.drawChunkBorderLine(g2, x1, x2, y2 - 1, color, false, myResolved);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user