chore: changed use Color in SDProblem instead of String
This commit is contained in:
parent
3c786c2e1d
commit
bdd107e7c5
@ -71,7 +71,7 @@ class SDProblemSelectionComboBoxAction : ComboBoxAction(), DumbAware {
|
||||
init {
|
||||
val name = (if (problem.solved) "✅ " else "") + problem.name
|
||||
templatePresentation.setText(name, false)
|
||||
templatePresentation.icon = ColorIcon(13, Color.decode(problem.rgb))
|
||||
templatePresentation.icon = ColorIcon(13, problem.rgb)
|
||||
}
|
||||
|
||||
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
|
||||
|
@ -1,9 +1,11 @@
|
||||
package io.gitlab.jfronny.sdom.model
|
||||
|
||||
data class SDProblem(val id: String, val name: String, val rgb: String, var solved: Boolean) : Comparable<SDProblem> {
|
||||
import java.awt.Color
|
||||
|
||||
data class SDProblem(val id: String, val name: String, val rgb: Color, var solved: Boolean) : Comparable<SDProblem> {
|
||||
companion object {
|
||||
fun of(problem: Problem, solved: Boolean): SDProblem {
|
||||
return SDProblem(problem.id, problem.name, problem.rgb, solved)
|
||||
return SDProblem(problem.id, problem.name, Color.decode(problem.rgb), solved)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user