From 187bfe5e05944d1b8480f0907ca32ef0f78c0883 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 19 Jan 2021 11:39:35 +0100 Subject: [PATCH] IDEA-244727 make registry key handle all new color pickers GitOrigin-RevId: 29aed03642dc34fbbdad53ef8ca8620423044afd --- platform/platform-impl/src/com/intellij/ui/ColorPicker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ui/ColorPicker.java b/platform/platform-impl/src/com/intellij/ui/ColorPicker.java index a1d7fdd3ab60..a37b24653cc2 100644 --- a/platform/platform-impl/src/com/intellij/ui/ColorPicker.java +++ b/platform/platform-impl/src/com/intellij/ui/ColorPicker.java @@ -21,6 +21,7 @@ import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.NlsContexts.DialogTitle; import com.intellij.openapi.util.Ref; import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.wm.IdeFocusManager; import com.intellij.openapi.wm.WindowManager; @@ -422,7 +423,7 @@ public class ColorPicker extends JPanel implements ColorListener, DocumentListen } public static void showColorPickerPopup(@Nullable final Project project, @Nullable Color currentColor, @NotNull final ColorListener listener, @Nullable RelativePoint location, boolean showAlpha, boolean showAlphaAsPercent) { - if(!isEnoughSpaceToShowPopup()) { + if( !isEnoughSpaceToShowPopup() || !Registry.is("ide.new.color.picker")) { Color color = showDialog(IdeFocusManager.getGlobalInstance().getFocusOwner(), IdeBundle.message("dialog.title.choose.color"), currentColor, showAlpha, null, showAlphaAsPercent); if (color != null) {