I noticed a regression in compose-multiplatform 1....
# compose-desktop
n
I noticed a regression in compose-multiplatform 1.4.0 related with scrolls on both x and y axises. I have a modifier with scrollable arguments. In compose version 1.2.2 & 1.3.1 I was able to use my touchbar to scroll in both directions simultaneously, but in 1.4.0 it is not possible anymore - only 1 direction at a time.
Copy code
.scrollable(
    state = ScrollableState {
            canvasVM.offsetY += it
           it
    },
    orientation = Orientation.Vertical
)
.scrollable(
    state = ScrollableState {
        canvasVM.offsetX += it
        it
    },
    orientation = Orientation.Horizontal
)
o
cc: @Alexander Maryanovsky Alexander, do you think it could be related to the changes in our fork? or is it something from the upstream?
i
It's probably related to smooth scrolling support. I'll take a look. Please try to disable this feature (temporary) by
compose.scrolling.smooth.enabled = false
system property
n
I assume you meant in
gradle.properties
? This did not help.
i
No, this var need to be in app runtime, not during gradle build process. Add
jvmArgs("-Dcompose.scrolling.smooth.enabled=false")
to your build script. It should be something like that:
Copy code
compose.desktop {
    application {
        mainClass = "MainKt"
        jvmArgs("-Dcompose.scrolling.smooth.enabled=false")

...
To check if it works you can try to read it in your main (or whatever during app run) function:
Copy code
val prop = "compose.scrolling.smooth.enabled"
    println("$prop=" + System.getProperty(prop))
n
I was able to set the property to false, but only through
System.setProperty(prop, "false")
(and logging confirmed it), but this did not help scrolling situation
a
What OS are you on?
n
MacOS Monterey
a
By touchbar do you mean the one on old-ish macbooks?
Or the touchpad?
n
MacBook Pro (Retina, 15-inch, Mid 2015) I don’t know what you mean by old 😄
Yes sorry, touchpad
a
ok
Can you open a bug here https://github.com/JetBrains/compose-multiplatform/issues ? We’ll take it from there.
n
Yes I will, thanks
a
Thanks
n
I added full example composable - just copypaste into your main https://github.com/JetBrains/compose-multiplatform/issues/3099
i
Found the problem, I'll prepare a fix soon. Thanks for the report