Features
New Menu Control
The new Menu control is a View that contains a vertical list of interactive items. These items notify whenever the user interacts with them using a pointer or the keyboard. This control support a couple types of action items and one that shows a new "sub" menu when the user interacts with it. You specify the contents of a Menu using the MenuFactory, which provides a declarative DSL for defining the structure and behavior of Menus.
val menu = menus(close = { /* close menu */ }) {
menu("Sub menu") {
prompt ("Prompt" ) { /* handle */ }
separator( )
action ("Do something", icon) { /* handle */ }
menu ("Sub-sub menu" ) {
action ("Some action" ) { /* handle */ }
separator( )
action ("Another action") { /* handle */ }
}
}
action("Execute action") { /* handle */ }
}TextFields now expose a purpose property
This new property provides a way to specify the use-case for a TextField, which allows its behavior to change rendering or what keyboard to show on mobile.
val textField = TextField().apply {
purpose = Email
}Unmanaged Scroll on Browser
NativeScrollPanelBehavior (for Browser) now takes a parameter that indicates whether it should use managedScrolling. Managed scrolling is what Doodle has done for a while now. It lets the framework directly handle positioning the ScrollPanel contents as the user scrolls. This is very powerful and flexible; but it relies on the browser invoking the onscroll event at a high framerate to avoid lag. Unfortunately this isn't always the case. Mobile WebKit does not deliver these events fast enough to make it smooth. So developer can choose to disable this behavior via the new flag.
APIs
- Deprecating previous types in
io.nacular.doodle.controls.menu Icon's generic bounds have been expanded toAny. This makes it easier to create icons that are based on arbitrary data instead of onlyViews.PathIconcan now be created with aStrokeandPaint, making it more customizable.- Helper for creating inset
Rectangle
Fixes | Improvements
- General
- Fixing many build warnings
- Right-left issue for popups and
BasicDropdownBehavior - Enabled parallel builds
- Edge case in View to/from absolute
BasicDropdownBehaviorandBasicSpinnerBehaviornow use rounded joints/end-caps for their arrow paths- Issue where
Themenot applied to existing popups whenThemeManager.selectedcalled - Expanded
ThemeManagerImpltests - New tests for
RealGraphicsSurfaceView index and zOrder - New tests for
PopupManagerImpl - New tests for
HorizontalFlowLayout
- Build
- Adopted Gradle library bundles using toml file
- Browser
- Context menu is now suppressed if the pointer pressed event is consumed. #52
- Incorrect default font-weight in global styles
- Display no longer sets a background color when filled w/
Transparent zOrdernow behaves as it should: only affecting ordering within a container. It also no longer allows Views to render above popups. #53zOrderno longer affects how popups are displayed- Issue where multiple shadows not rendered properly by Webkit
Versions
- Mockk -> 1.13.5
- Gradle -> 8.1.1
- LogBack -> 1.4.7
- slf4j-api -> 2.0.4