TextAttributesKey FOLDED_TEXT_ATTRIBUTES = TextAttributesKey.createTextAttributesKey("FOLDED_TEXT_ATTRIBUTES");
TextAttributesKey DELETED_TEXT_ATTRIBUTES = TextAttributesKey.createTextAttributesKey("DELETED_TEXT_ATTRIBUTES");
- ColorKey GUTTER_BACKGROUND = ColorKey.createColorKey("GUTTER_BACKGROUND");
+ ColorKey GUTTER_BACKGROUND = ColorKey.createColorKey("GUTTER_BACKGROUND", new JBColor(0xf0f0f0, 0x313335));
@Deprecated ColorKey LEFT_GUTTER_BACKGROUND = GUTTER_BACKGROUND;
ColorKey NOTIFICATION_BACKGROUND = ColorKey.createColorKey("NOTIFICATION_BACKGROUND");
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.RangeMarker;
import com.intellij.openapi.editor.colors.CodeInsightColors;
+import com.intellij.openapi.editor.colors.EditorColors;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.ex.MarkupModelEx;
import com.intellij.openapi.editor.ex.RangeHighlighterEx;
@Override
public void paintIcon(Component c, Graphics g, int x, int y) {
- g.setColor(ICON_BACKGROUND_COLOR);
- g.fillRect(x, y, getIconWidth(), getIconHeight());
- g.setColor(JBColor.GRAY);
- g.drawRect(x, y, getIconWidth(), getIconHeight());
- myIcon.paintIcon(c, g, x, y);
+ Graphics2D g2 = (Graphics2D)g.create();
+ try {
+ Color gutterBackground = EditorColors.GUTTER_BACKGROUND.getDefaultColor();
+ g2.setColor(gutterBackground);
+ g2.fillRoundRect(x, y, getIconWidth(), getIconHeight(), 4, 4);
+ myIcon.paintIcon(c, g2, x, y);
+ } finally {
+ g2.dispose();
+ }
}
@Override