Skip to content

Commit

Permalink
Fix color editor not showing correct initial value
Browse files Browse the repository at this point in the history
  • Loading branch information
sghpjuikit committed Jan 16, 2025
1 parent d79e198 commit f0380ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import sp.it.util.ui.minPrefMaxWidth

/** [ValueTextField] for [Color] using [ColorPicker]. */
class ColorTextField(initialValue: Color? = null): ValueTextField<Color>(initialValue) {
private var picker = ColorPicker().apply { minPrefMaxWidth = 40.emScaled }
private var picker = ColorPicker(initialValue ?: Color.TRANSPARENT).apply { minPrefMaxWidth = 40.emScaled }
private var valueChanging = Suppressor()

init {
Expand Down

0 comments on commit f0380ee

Please sign in to comment.