Skip to content

Commit

Permalink
chore: use ColorChooserService
Browse files Browse the repository at this point in the history
  • Loading branch information
liying2008 committed Dec 2, 2023
1 parent 4078eee commit 00e043e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ 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
import java.awt.event.MouseEvent
import java.awt.event.MouseListener
import javax.swing.JComponent
import javax.swing.JOptionPane
import kotlin.collections.LinkedHashMap

/**
* =======================================================
Expand Down Expand Up @@ -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 -> {
Expand Down

0 comments on commit 00e043e

Please sign in to comment.