RunDashboard: support node links

- Use LaF dependent colors for node links foreground.
This commit is contained in:
Konstantin Aleev
2017-09-12 20:41:59 +03:00
parent 88498c465d
commit 2af4fae52d
@@ -17,6 +17,7 @@ package com.intellij.execution.dashboard.hyperlink;
import com.intellij.ui.SimpleColoredComponent;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.ui.UI;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -54,7 +55,11 @@ public class RunDashboardHyperlinkTextComponent extends RunDashboardHyperlinkCom
if (myText.isEmpty()) return;
boolean isActive = mySelected || isAimed();
SimpleTextAttributes linkTextAttributes = isActive ? SimpleTextAttributes.LINK_ATTRIBUTES : SimpleTextAttributes.SYNTHETIC_ATTRIBUTES;
SimpleTextAttributes linkTextAttributes = isActive
? new SimpleTextAttributes(SimpleTextAttributes.STYLE_UNDERLINE,
UI.getColor("link.hover.foreground"))
: new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, UI.getColor("link.foreground"));
if (myBold) {
linkTextAttributes = SimpleTextAttributes.merge(linkTextAttributes, SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES);
}