import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.colors.EditorSchemeAttributeDescriptor;
+import com.intellij.openapi.editor.colors.EditorSchemeAttributeDescriptorWithPath;
import com.intellij.openapi.options.OptionsBundle;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Pair;
import com.intellij.ui.ColorPanel;
import com.intellij.ui.components.JBCheckBox;
import com.intellij.util.EventDispatcher;
+import com.intellij.util.FontUtil;
import com.intellij.util.ui.JBUI;
+import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
myInheritedMessage = ApplicationBundle.message("label.inherited.gradient",
rainbowOptionsID,
languageDefaultPageID);
- myInheritedMessageTooltip = ApplicationBundle.message("label.inherited.gradient.tooltip",
- rainbowOptionsID,
- languageDefaultPageID);
+
+ myInheritedMessageTooltip = checkRightArrow(ApplicationBundle.message("label.inherited.gradient.tooltip",
+ rainbowOptionsID,
+ languageDefaultPageID));
+
myOverrideMessage = ApplicationBundle.message("label.override.gradient");
HyperlinkListener listener = e -> myDispatcher.getMulticaster().onHyperLinkClicked(e);
Messages.configureMessagePaneUi(myGradientLabel, myOverrideMessage, null);
myGradientLabel.addHyperlinkListener(listener);
- Messages.configureMessagePaneUi(myInheritanceLabel, ApplicationBundle.message("label.rainbow.inheritance",
- rainbowOptionsID,
- rainbowOptionsID,
- languageDefaultPageID), null);
- myInheritanceLabel.setToolTipText(ApplicationBundle.message("label.rainbow.inheritance.tooltip",
- rainbowOptionsID,
- languageDefaultPageID));
+ Messages.configureMessagePaneUi(myInheritanceLabel,
+ checkRightArrow(ApplicationBundle.message("label.rainbow.inheritance",
+ rainbowOptionsID,
+ rainbowOptionsID,
+ languageDefaultPageID)),
+ null);
+ myInheritanceLabel.setToolTipText(checkRightArrow(ApplicationBundle.message("label.rainbow.inheritance.tooltip",
+ rainbowOptionsID,
+ languageDefaultPageID)));
myInheritanceLabel.addHyperlinkListener(listener);
myInheritanceLabel.setBorder(JBUI.Borders.empty(4, 0, 4, 4));
}
+ @NotNull
+ private static String checkRightArrow(@NotNull String str) {
+ return str.replaceAll("->", FontUtil.rightArrow(UIUtil.getLabelFont()));
+ }
+
@NotNull
@Override
public JComponent getPanel() {
rainbow.option.panel.display.name=Semantic highlighting
label.override.gradient=<html>Override gradient:</html>
label.inherited.gradient=<html>Inherited from <a href="{0}">{1}</a> gradient:</html>
-label.inherited.gradient.tooltip=<html>''{0}\u2192Override gradient'' from<br>''{1}'' section</html>
+label.inherited.gradient.tooltip=<html>''{0}->Override gradient'' from<br>''{1}'' section</html>
checkbox.stop.1=Stop #1
checkbox.stop.2=Stop #2
checkbox.stop.3=Stop #3
checkbox.stop.4=Stop #4
checkbox.stop.5=Stop #5
checkbox.rainbow=<html>Unique color for each parameter<br>and local variable<br><font color=gray><sub>Chosen from generated gradient</sub></font></html>
-label.rainbow.inheritance=<html><div style="text-align:right" vertical-align="top">''{0}\u2192Unique color''<br>of <a href="{1}">{2}</html>
-label.rainbow.inheritance.tooltip=<html>''{0}\u2192Unique color'' from<br>''{1}'' section</html>
\ No newline at end of file
+label.rainbow.inheritance=<html><div style="text-align:right" vertical-align="top">''{0}->Unique color''<br>of <a href="{1}">{2}</html>
+label.rainbow.inheritance.tooltip=<html>''{0}->Unique color'' from<br>''{1}'' section</html>
\ No newline at end of file