Skip to content

Commit 5043f83

Browse files
authored
[CQ] prefer Darcula-aware JBColor (#8500)
Prefer `JBColor` over `java.awt.Color` which doesn't play nice with dark themes. <img width="441" height="78" alt="image" src="https://github.com/user-attachments/assets/f53f8acd-da9c-4512-a703-ab24806b7e6b" /> https://www.jetbrains.com/help/inspectopedia/UseJBColor.html --- <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
1 parent 6012641 commit 5043f83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/io/flutter/view/ViewUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import com.intellij.openapi.ui.VerticalFlowLayout;
99
import com.intellij.openapi.wm.ToolWindow;
10+
import com.intellij.ui.JBColor;
1011
import com.intellij.ui.components.JBLabel;
1112
import com.intellij.ui.components.labels.LinkLabel;
1213
import com.intellij.ui.content.Content;
@@ -26,7 +27,7 @@ public class ViewUtils {
2627
final JBLabel descriptionLabel = new JBLabel(wrapWithHtml(warning));
2728
descriptionLabel.setBorder(JBUI.Borders.empty(5));
2829
descriptionLabel.setHorizontalAlignment(SwingConstants.CENTER);
29-
descriptionLabel.setForeground(Color.RED);
30+
descriptionLabel.setForeground(JBColor.RED);
3031
return descriptionLabel;
3132
}
3233

0 commit comments

Comments
 (0)