mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Bookmarks: better rendering for "check" gutter icon
This commit is contained in:
@@ -48,7 +48,7 @@ public interface EditorColors {
|
||||
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");
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.navigation.NavigationItem;
|
||||
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;
|
||||
@@ -335,11 +336,15 @@ public class Bookmark implements Navigatable {
|
||||
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user