mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection settings: use grey color to display rename profile hint (IDEA-165091)
This commit is contained in:
+1
-2
@@ -124,8 +124,7 @@ public abstract class AbstractDescriptionAwareSchemesPanel<T extends Scheme> ext
|
||||
|
||||
@Override
|
||||
public final void showMessage(@Nullable String message, @NotNull MessageType messageType) {
|
||||
myWarningLabel.setText(message);
|
||||
myWarningLabel.setForeground(messageType.getTitleForeground());
|
||||
showMessage(message, messageType, myWarningLabel);
|
||||
myLayout.show(myInfoComponent, ERROR_CARD);
|
||||
}
|
||||
|
||||
|
||||
+13
-2
@@ -56,9 +56,9 @@ public abstract class AbstractSchemesPanel<T extends Scheme, InfoComponent exten
|
||||
|
||||
// region Colors (probably should be standard for platform UI)
|
||||
|
||||
protected final Color HINT_FOREGROUND = JBColor.GRAY;
|
||||
protected static final Color HINT_FOREGROUND = JBColor.GRAY;
|
||||
@SuppressWarnings("UseJBColor")
|
||||
protected final Color ERROR_MESSAGE_FOREGROUND = Color.RED;
|
||||
protected static final Color ERROR_MESSAGE_FOREGROUND = Color.RED;
|
||||
|
||||
// endregion
|
||||
|
||||
@@ -235,4 +235,15 @@ public abstract class AbstractSchemesPanel<T extends Scheme, InfoComponent exten
|
||||
actionGroupPopup.show(new RelativePoint(myParentComponent, new Point(JBUI.scale(2), myParentComponent.getHeight() - JBUI.scale(1))));
|
||||
}
|
||||
}
|
||||
|
||||
protected static void showMessage(@Nullable String message,
|
||||
@NotNull MessageType messageType,
|
||||
@NotNull JLabel infoComponent) {
|
||||
infoComponent.setText(message);
|
||||
Color foreground =
|
||||
messageType == MessageType.INFO ? HINT_FOREGROUND :
|
||||
messageType == MessageType.ERROR ? ERROR_MESSAGE_FOREGROUND :
|
||||
messageType.getTitleForeground();
|
||||
infoComponent.setForeground(foreground);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-7
@@ -21,7 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Basic implementation of {@link AbstractSchemesPanel} that provides simple informational label as right side of the panel.
|
||||
@@ -38,12 +37,7 @@ public abstract class SimpleSchemesPanel<T extends Scheme> extends AbstractSchem
|
||||
|
||||
@Override
|
||||
public final void showMessage(@Nullable String message, @NotNull MessageType messageType) {
|
||||
myInfoComponent.setText(message);
|
||||
Color foreground =
|
||||
messageType == MessageType.INFO ? HINT_FOREGROUND :
|
||||
messageType == MessageType.ERROR ? ERROR_MESSAGE_FOREGROUND :
|
||||
messageType.getTitleForeground();
|
||||
myInfoComponent.setForeground(foreground);
|
||||
showMessage(message, messageType, myInfoComponent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user