Commit 070131b
authored
Fix Color Picker bugs, optimize HexColorTextField, and update API (#146)
* Fix ColorSpectrum not calling onValueChangeFinished after drag adjustment
* Optimize HexColorTextField component width
* Optimize HexColorTextField to format text only after losing focus
* Deprecated SquareColorSpectrum/RoundColorSpectrum
* Use HexVisualTransformation to handle HexColorTextField, and manage the logic when the text is blank
* Add Color parameter to ColorPickerState.onValueChangeFinished
* Refactor ColorPicker advanced fields and text input
Refactors the advanced color fields in ColorPicker to use new ValueLabelTextField and ValueTextField composables, improving code reuse and input parsing for RGB and HSV fields. Moves and rewrites HexColorTextField and AlphaTextField for better modularity and input handling. Updates variable naming for consistency and adds visual transformation for hex input. Suppresses deprecation warnings where needed.
* Improve alpha value parsing and add % visual transformation
* Adjust spacing and sizing in ColorPicker sliders
* Limit text input length in ColorPicker fields
Added maxTextLength parameter to ValueLabelTextField, ValueTextField, HexColorTextField, and AlphaTextField to restrict user input length for color values. This improves input validation and prevents users from entering excessively long values in color picker fields.
* Preserve alpha channel when updating color in ColorSpectrum1 parent 727d9ba commit 070131b
File tree
1 file changed
+393
-189
lines changed- fluent/src/commonMain/kotlin/io/github/composefluent/component
1 file changed
+393
-189
lines changed
0 commit comments