mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 19:02:13 +07:00
IDEA-137353 Sometimes it is hard to set a breakpoint on the gutter
This commit is contained in:
+10
-5
@@ -78,6 +78,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.editor.impl.EditorGutterComponentImpl");
|
||||
private static final int START_ICON_AREA_WIDTH = 15;
|
||||
private static final int FREE_PAINTERS_AREA_WIDTH = 5;
|
||||
private static final int GAP_BETWEEN_ICONS_AND_FREE_PAINTERS_AREA = 5;
|
||||
private static final int GAP_BETWEEN_ICONS = 3;
|
||||
private static final int GAP_BEFORE_LINE_NUMBERS = 5;
|
||||
private static final int GAP_AFTER_LINE_NUMBERS = 4;
|
||||
@@ -91,7 +92,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
|
||||
private final EditorImpl myEditor;
|
||||
private final FoldingAnchorsOverlayStrategy myAnchorsDisplayStrategy;
|
||||
private int myLineMarkerAreaWidth = START_ICON_AREA_WIDTH + FREE_PAINTERS_AREA_WIDTH;
|
||||
private int myLineMarkerAreaWidth = START_ICON_AREA_WIDTH + GAP_BETWEEN_ICONS_AND_FREE_PAINTERS_AREA + FREE_PAINTERS_AREA_WIDTH;
|
||||
private int myIconsAreaWidth = START_ICON_AREA_WIDTH;
|
||||
private int myLineNumberAreaWidth = 0;
|
||||
private int myAdditionalLineNumberAreaWidth = 0;
|
||||
@@ -215,8 +216,8 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
int lastVisibleOffset = myEditor.logicalPositionToOffset(myEditor.xyToLogicalPosition(new Point(0, clip.y + clip.height + myEditor.getLineHeight())));
|
||||
paintFoldingBackground(g, clip, backgroundColor);
|
||||
paintLineMarkersBackground(g, clip, backgroundColor);
|
||||
paintBackground(g, clip, getLineMarkerAreaOffset(), getLineMarkerAreaWidth(), backgroundColor);
|
||||
paintEditorBackgrounds(g, firstVisibleOffset, lastVisibleOffset);
|
||||
|
||||
paintAnnotations(g, clip);
|
||||
paintLineMarkers(g, firstVisibleOffset, lastVisibleOffset);
|
||||
paintFoldingLines((Graphics2D)g, clip);
|
||||
@@ -688,7 +689,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
}
|
||||
});
|
||||
|
||||
myLineMarkerAreaWidth = myIconsAreaWidth + FREE_PAINTERS_AREA_WIDTH;
|
||||
myLineMarkerAreaWidth = myIconsAreaWidth + GAP_BETWEEN_ICONS_AND_FREE_PAINTERS_AREA + FREE_PAINTERS_AREA_WIDTH;
|
||||
}
|
||||
|
||||
private boolean isHighlighterVisible(RangeHighlighter highlighter) {
|
||||
@@ -780,7 +781,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
|
||||
int height = endY - startY;
|
||||
int w = FREE_PAINTERS_AREA_WIDTH;
|
||||
int x = getLineMarkerAreaOffset() + myIconsAreaWidth - 1;
|
||||
int x = getLineMarkerFreePaintersAreaOffset() - 1;
|
||||
return new Rectangle(x, startY, w, height);
|
||||
}
|
||||
|
||||
@@ -1141,6 +1142,10 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
return getAnnotationsAreaOffset() + getAnnotationsAreaWidthEx();
|
||||
}
|
||||
|
||||
private int getLineMarkerFreePaintersAreaOffset() {
|
||||
return getLineMarkerAreaOffset() + myIconsAreaWidth + GAP_BETWEEN_ICONS_AND_FREE_PAINTERS_AREA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconsAreaWidth() {
|
||||
return myIconsAreaWidth;
|
||||
@@ -1364,7 +1369,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
if (findFoldingAnchorAt(e.getX(), e.getY()) != null) {
|
||||
return null;
|
||||
}
|
||||
if (e.isConsumed() || e.getX() > getWhitespaceSeparatorOffset()) {
|
||||
if (e.isConsumed() || e.getX() > getWhitespaceSeparatorOffset() || e.getX() < getLineMarkerFreePaintersAreaOffset()) {
|
||||
return null;
|
||||
}
|
||||
final ActiveGutterRenderer[] gutterRenderer = {null};
|
||||
|
||||
Reference in New Issue
Block a user