Features
Strongly Typed Sliders
ValueSlider, Slider and CircularSlider were previously tied to a Double. This meant it was not easy to force use cases where integer values would be more appropriate. This is now fixed, as these controls are now strongly typed to a numeric value instead of only supporting Double.
val slider = Slider(10 .. 20)
slider.value = 11.2 // will not compile since slider has a type of IntMore Flexible Layouts
Layouts are generally triggered whenever their container's size changes or a child of the container has a bounds change. But there are cases when this default behavior does not work as well. A good example is a Layout that depends on a child's idealSize. Such a Layout won't be invoked when the idealSizes change, and will be out of date in some cases.
This is now fixed by giving Layouts a chance to act when min/ideal-size changes for children of a Container. There are actually 3 new APIs that provide a lot of flexibility in how Layouts behave.
public fun requiresLayout(container: PositionableContainer, old: Size, new: Size): Boolean = true
public fun requiresLayout(child: Positionable, of: PositionableContainer, old: Rectangle, new: Rectangle): Boolean = false
public fun requiresLayout(child: Positionable, of: PositionableContainer, old: SizePreferences, new: SizePreferences): Boolean = falseForm Controls
- New
switchandswitchListform controls - New
spinnerform control - New
framedform control to wrap other controls in a configurable container - New
checkform control with arbitrary view as annotation radioList,checkList,namedandlabeledform controls now allow a custom renderer and insets for their container- sub-forms now allow custom
Insetsandbehavior
APIs
- SplitPanel now has explicit events for orientation and content changes.
splitPanel.orientationChanged += { panel, old, new ->
}
splitPanel.contentsChanged += { panel, old, new ->
}Fixes | Improvements
- Improved disabled rendering for several Basic behaviors.
SliderBehaviorandProgressIndicatorBehaviornow re-render the view when enabled changes.- Improved focus handling for
CommonButtonBehavior(and its implementations) when pointer pressed. - Fixed bug where
SplitPaneldid not render its children correctly when its orientation was set to horizontal. CommonSplitPanelBehaviornow properly handles orientation.- Fixed bug in
ColorPickerthat showed the wrong selection upon creation. - Improved
BasicDropdownBehaviorrendering whenbuttonWidthis 0. - Fixed issue with NativeTextField focus on mobile.
- [Browser] Space bar is now suppressed properly if consumed by a View.
Dependencies
- Added Kover for code coverage
- Removed Jacoco