Skip to content

Commit 255349f

Browse files
authored
[PE] make color picker “dark theme” aware (#8109)
`java.awt` colors are not dark-theme friendly but `JBColor`s are. As a bonus we can use the `Gray` constant. --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <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 68f4a11 commit 255349f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flutter-studio/src/io/flutter/editor/AndroidStudioColorPickerProvider.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
package io.flutter.editor;
77

8+
import com.intellij.ui.Gray;
89
import com.intellij.ui.colorpicker.ColorPickerBuilder;
910
import com.intellij.openapi.ui.popup.Balloon;
1011
import com.intellij.openapi.ui.popup.BalloonBuilder;
@@ -38,7 +39,7 @@ public void show(
3839
popup = null;
3940

4041
final LightCalloutPopup colorPanel = new ColorPickerBuilder()
41-
.setOriginalColor(initialColor != null ? initialColor : new Color(255, 255, 255))
42+
.setOriginalColor(initialColor != null ? initialColor : Gray._255)
4243
.addSaturationBrightnessComponent()
4344
.addColorAdjustPanel()
4445
.addColorValuePanel().withFocus()

0 commit comments

Comments
 (0)