From 00e043e6f2b838f68c4b1df2df509bf54a03da5b Mon Sep 17 00:00:00 2001 From: liying2008 Date: Sun, 3 Dec 2023 00:29:33 +0800 Subject: [PATCH] chore: use ColorChooserService --- .../git/conflict/setting/ColorSettingsPanelImpl.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/cc/duduhuo/git/conflict/setting/ColorSettingsPanelImpl.kt b/src/main/java/cc/duduhuo/git/conflict/setting/ColorSettingsPanelImpl.kt index 50cfa05..a11d4b3 100644 --- a/src/main/java/cc/duduhuo/git/conflict/setting/ColorSettingsPanelImpl.kt +++ b/src/main/java/cc/duduhuo/git/conflict/setting/ColorSettingsPanelImpl.kt @@ -9,7 +9,7 @@ import cc.duduhuo.git.conflict.action.HighlightConflictAction import cc.duduhuo.git.conflict.model.MarkColor import cc.duduhuo.git.conflict.model.PersistentMarkColor import cc.duduhuo.git.conflict.tool.ext.formatHexA -import com.intellij.ui.ColorChooser +import com.intellij.ui.ColorChooserService import java.awt.Color import java.awt.event.ActionEvent import java.awt.event.ItemEvent @@ -17,7 +17,6 @@ import java.awt.event.MouseEvent import java.awt.event.MouseListener import javax.swing.JComponent import javax.swing.JOptionPane -import kotlin.collections.LinkedHashMap /** * ======================================================= @@ -223,7 +222,10 @@ class ColorSettingsPanelImpl : ColorSettingsPanel() { else -> null } - val chooseColor = ColorChooser.chooseColor(mainPanel, "Choose a Color", initialColor, true) + val chooseColor = ColorChooserService.getInstance().showDialog( + null, mainPanel, "Choose a Color", initialColor, true, + emptyList(), false + ) if (chooseColor != null) { when (fieldIndex) { CURRENT_CONTENT -> {