docs(jetbrains): replace Color enum with Theme in UI DSL binding example

Avoid confusion with java.awt.Color which the AGENTS.md itself says to never use.
Use a Theme enum instead to keep the example unambiguous.
This commit is contained in:
kirillk
2026-04-15 16:39:14 -04:00
parent ac7f50d9c1
commit 2b71409a3e
+7 -5
View File
@@ -416,11 +416,13 @@ Bind component values to model properties. Values are applied on `DialogPanel.ap
| `buttonsGroup {}.bind(model::prop)` | radio group |
```kotlin
enum class Theme { LIGHT, DARK }
data class Settings(
var name: String = "",
var count: Int = 0,
var enabled: Boolean = false,
var color: Color = Color.GREY,
var theme: Theme = Theme.LIGHT,
)
val model = Settings()
@@ -435,10 +437,10 @@ val panel = panel {
row {
checkBox("Enabled").bindSelected(model::enabled)
}
buttonsGroup("Color:") {
row { radioButton("White", Color.WHITE) }
row { radioButton("Grey", Color.GREY) }
}.bind(model::color)
buttonsGroup("Theme:") {
row { radioButton("Light", Theme.LIGHT) }
row { radioButton("Dark", Theme.DARK) }
}.bind(model::theme)
}
// Later: