From d401e2a618247df6a1c3d4a1fe0de75417db5463 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 26 Feb 2013 09:44:22 +0100 Subject: [PATCH] IDEA-95612 The Darcula tooltips colors are ugly and not customizable --- .../hint/ParameterInfoComponent.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/ParameterInfoComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/hint/ParameterInfoComponent.java index 3880ca5872e1..251d1b4552a3 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/ParameterInfoComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/ParameterInfoComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,10 +20,7 @@ import com.intellij.lang.parameterInfo.ParameterInfoHandler; import com.intellij.lang.parameterInfo.ParameterInfoUIContextEx; import com.intellij.openapi.editor.Editor; import com.intellij.psi.PsiElement; -import com.intellij.ui.Gray; -import com.intellij.ui.ScrollPaneFactory; -import com.intellij.ui.SideBorder; -import com.intellij.ui.StrikeoutLabel; +import com.intellij.ui.*; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; @@ -43,14 +40,14 @@ class ParameterInfoComponent extends JPanel{ private final OneElementComponent[] myPanels; private static final Color BACKGROUND_COLOR = HintUtil.INFORMATION_COLOR; - private static final Color FOREGROUND_COLOR = Gray._0; + private static final Color FOREGROUND_COLOR = JBColor.foreground; // private static final Color DISABLED_BACKGROUND_COLOR = HintUtil.INFORMATION_COLOR; private static final Color DISABLED_FOREGROUND_COLOR = Gray._128; - private static final Color HIGHLIGHTED_BORDER_COLOR = new Color(231, 254, 234); + private static final Color HIGHLIGHTED_BORDER_COLOR = new JBColor(new Color(231, 254, 234), Gray._100); private final Font NORMAL_FONT; private final Font BOLD_FONT; - private static final Border BOTTOM_BORDER = new SideBorder(Color.lightGray, SideBorder.BOTTOM); + private static final Border BOTTOM_BORDER = new SideBorder(JBColor.LIGHT_GRAY, SideBorder.BOTTOM); private static final Border BACKGROUND_BORDER = BorderFactory.createLineBorder(BACKGROUND_COLOR); protected int myWidthLimit; @@ -112,13 +109,13 @@ class ParameterInfoComponent extends JPanel{ boolean isDisabledBeforeHighlight, Color background) { myPanels[i].setup(text, highlightStartOffset, highlightEndOffset, isDisabled, strikeout, isDisabledBeforeHighlight, background); - myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : BOTTOM_BORDER); + myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : new SideBorder(new JBColor(JBColor.LIGHT_GRAY, Gray._90), SideBorder.BOTTOM)); } @Override public void setupUIComponentPresentation(final String[] texts, final EnumSet[] flags, final Color background) { myPanels[i].setup(texts, flags, background); - myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : BOTTOM_BORDER); + myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : new SideBorder(new JBColor(JBColor.LIGHT_GRAY, Gray._90), SideBorder.BOTTOM)); } @Override