mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] update ref colors
This commit is contained in:
@@ -15,18 +15,16 @@
|
||||
*/
|
||||
package com.intellij.vcs.log;
|
||||
|
||||
import com.intellij.ui.ColorUtil;
|
||||
import com.intellij.ui.JBColor;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class VcsLogStandardColors {
|
||||
public static class Refs {
|
||||
public static final Color TIP = new JBColor(new Color(0xedea74), new Color(113, 111, 64));
|
||||
public static final Color LEAF = new JBColor(new Color(0xf478cc), new Color(0x6e2857));
|
||||
public static final Color BRANCH = new JBColor(new Color(0x75eec7), new Color(0x0D6D4F));
|
||||
public static final Color BRANCH_REF = new JBColor(new Color(0xbcbcfc), new Color(0xbcbcfc).darker().darker());
|
||||
public static final Color TAG =
|
||||
new JBColor(ColorUtil.darker(new Color(255, 255, 255), 1), ColorUtil.brighter(new Color(60, 63, 65), 3));
|
||||
public static final Color TIP = new JBColor(new Color(0xffe137), new Color(0xe1c731));
|
||||
public static final Color LEAF = new JBColor(new Color(0x8a2d6b), new Color(0xc31e8c));
|
||||
public static final Color BRANCH = new JBColor(new Color(0x3cb45c), new Color(0x3cb45c));
|
||||
public static final Color BRANCH_REF = new JBColor(new Color(0x9f79b5), new Color(0x9f79b5));
|
||||
public static final Color TAG = new JBColor(new Color(0x7a7a7a), new Color(0x999999));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ import com.intellij.vcs.log.data.LoadingDetails;
|
||||
import com.intellij.vcs.log.data.VcsLogData;
|
||||
import com.intellij.vcs.log.ui.VcsLogColorManager;
|
||||
import com.intellij.vcs.log.ui.render.TagIcon;
|
||||
import com.intellij.vcs.log.ui.render.TagLabelPainter;
|
||||
import com.intellij.vcs.log.ui.render.TextLabelPainter;
|
||||
import com.intellij.vcs.log.util.VcsUserUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -506,7 +505,7 @@ class CommitPanel extends JBPanel {
|
||||
for (VcsRef reference : typeAndRefs.getValue()) {
|
||||
Icon icon = null;
|
||||
if (index == 0) {
|
||||
Color color = TagLabelPainter.getTagColor(type);
|
||||
Color color = type.getBackgroundColor();
|
||||
icon = new TagIcon(height, getBackground(),
|
||||
typeAndRefs.getValue().size() > 1 ? new Color[]{color, color} : new Color[]{color});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ package com.intellij.vcs.log.ui.render;
|
||||
|
||||
import com.intellij.openapi.ui.GraphicsConfig;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.ui.ColorUtil;
|
||||
import com.intellij.ui.SimpleColoredComponent;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
@@ -81,7 +80,7 @@ public class TagLabelPainter {
|
||||
VcsRef firstRef = ObjectUtils.assertNotNull(ContainerUtil.getFirstItem(typeAndRefs.getValue()));
|
||||
VcsRefType type = typeAndRefs.getKey();
|
||||
boolean multiple = typeAndRefs.getValue().size() > 1;
|
||||
Color color = getTagColor(type);
|
||||
Color color = type.getBackgroundColor();
|
||||
TagIcon tagIcon = new TagIcon(myHeight, myBackground, multiple ? new Color[]{color, color} : new Color[]{color});
|
||||
|
||||
String text = firstRef.getName();
|
||||
@@ -91,18 +90,6 @@ public class TagLabelPainter {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Color getTagColor(@NotNull VcsRefType type) {
|
||||
Color color = type.getBackgroundColor();
|
||||
if (UIUtil.isUnderDarcula()) {
|
||||
color = ColorUtil.brighter(color, 2);
|
||||
}
|
||||
else {
|
||||
color = ColorUtil.darker(color, 2);
|
||||
}
|
||||
return ColorUtil.saturate(color, 5);
|
||||
}
|
||||
|
||||
public void paint(@NotNull Graphics2D g2, int x, int y, int height) {
|
||||
if (myLabels.isEmpty()) return;
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class HgRefManager implements VcsLogRefManager {
|
||||
private static final Color CLOSED_BRANCH_COLOR = new JBColor(new Color(0xee7f8a), new Color(0xee7f8a).darker());
|
||||
private static final Color LOCAL_TAG_COLOR = JBColor.CYAN;
|
||||
private static final Color MQ_TAG_COLOR = new JBColor(new Color(0x1764ff), new Color(0x1764ff).darker());
|
||||
private static final Color CLOSED_BRANCH_COLOR = new JBColor(new Color(0x823139), new Color(0xff5f6f));
|
||||
private static final Color LOCAL_TAG_COLOR = new JBColor(new Color(0x009090), new Color(0x00f3f3));
|
||||
private static final Color MQ_TAG_COLOR = new JBColor(new Color(0x002f90), new Color(0x0055ff));
|
||||
|
||||
public static final VcsRefType TIP = new SimpleRefType(true, VcsLogStandardColors.Refs.TIP);
|
||||
public static final VcsRefType HEAD = new SimpleRefType(true, VcsLogStandardColors.Refs.LEAF);
|
||||
|
||||
Reference in New Issue
Block a user