David W
01/09/2022, 4:40 AMAyfri
01/09/2022, 2:59 PMKebbin
01/09/2022, 3:15 PMeygraber
01/09/2022, 4:52 PMAyfri
01/09/2022, 10:49 PMSebastian Kürten
01/11/2022, 8:33 AMsingleWindowApplication()
I end up in artifact org.jetbrains.compose.ui:ui-desktop:1.0.1
and a file androidx.compose.ui.window.Window_desktopKt.class
. Now I thought the sources for that would be somewhere in https://github.com/JetBrains/compose-jb but I cannot find it there anywhere. Can anybody enlighten me where the sources actually are?Vivek Sharma
01/11/2022, 10:51 AMColton Idle
01/11/2022, 3:05 PMSebastian Kürten
01/11/2022, 4:49 PMAman Kapoor
01/11/2022, 7:29 PMDavid W
01/12/2022, 2:18 AMVivek Sharma
01/12/2022, 11:49 AMroom
?
I think other desktop app uses remote db for their apps, no?spierce7
01/12/2022, 3:36 PMhalirutan
01/13/2022, 1:44 AM<http://Dispatchers.IO|Dispatchers.IO>
coroutine scope.
Now, since I'm a compose noob, I have a mutable state list, where I append the datapoints. I rarely get a ConcurrentModificationException
exception which I guess is because the list is modified in the IO scope and read in the UI by compose.
I read that one solution is to basically use a mutable state of an immutable list and assign a new list. That sounds a lot like I don't want to do this. Isn't there a better way to have a long list of datapoints that I can update from the IO thread?Grégory Lureau
01/13/2022, 9:37 AMGordon
01/13/2022, 1:59 PM@OptIn(ExperimentalComposeUiApi::class)
@Composable
@Preview
fun ImagePreview(args: Array<String>) {
if (args.size != 2) {
Text(text = "Usage: app image1 image2, args:${args.size}")
return
}
val bitmap = loadImageBitmap(FileInputStream(args[1]))
val bitmap2 = loadImageBitmap(FileInputStream(args[0]))
var mousePos by remember { mutableStateOf(IntOffset(320, 0)) }
Box(
modifier = Modifier.background(color=Color.Gray).fillMaxSize()
.clickable(onClick = {
println("click at $mousePos")
}).onPointerEvent(PointerEventType.Move) {
mousePos = IntOffset(it.changes.last().position.x.toInt(), 0)
}
) {
Image(bitmap = bitmap, "kotlin", contentScale = ContentScale.None, modifier = Modifier.fillMaxSize() )
Box(modifier = Modifier.fillMaxHeight().fillMaxWidth()) {
Image(bitmap = bitmap2, contentDescription = "bla", contentScale = ContentScale.None, modifier = Modifier.fillMaxSize().clip(MyShape(mousePos.x)))
}
Box(
modifier = Modifier.width(4.dp).fillMaxHeight().offset { mousePos }.background(color = Color.Red)
)
}
}
class MyShape(private val maxWidth: Int) : Shape {
override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline {
return Outline.Rectangle(Rect(Offset(0f,0f), Size(maxWidth.toFloat(), size.height)))
}
}
Michael Paus
01/14/2022, 12:36 PMMichael Paus
01/14/2022, 1:26 PMexpect
somewhere I get the following error when I open the relevant file. Funnily the project builds and runs just fine and does what I expected
it to do.John O'Reilly
01/14/2022, 4:18 PMTextField
). Looks like, when long-pressing, we get onValueChange
for the non-accented version first and then again when user picks one of options shownThomas
01/14/2022, 5:59 PMKirill Grouchnikov
01/14/2022, 9:38 PMMarin Tolić
01/15/2022, 9:56 PMBrian Guertin
01/16/2022, 10:33 PMcompose-jb
repository now has an example for using common widgets on web canvas (using wasm) and on UIKit on iOS?? https://github.com/JetBrains/compose-jb/tree/master/examples/falling-balls-mpp/srcQuentin Dommerc
01/17/2022, 6:48 AMshape
issue. It’s relying on Surface
which, by default has a RectangleShape. Doesn’t really matter what we put in the shape
parameter of the AlertDialog then. Should I file an issue on gh? (see the grey rectangle corners on my screenshot)
edit: sorry for the colors, sorry for your eyes 🙈Pavle Joksovic
01/17/2022, 8:39 AMKebbin
01/18/2022, 2:20 PManimatePanBy
and animateRotateBy
, but one runs, then the other after the first has finished. So the object pans across, then rotates.
I'd like the object to pan while it is rotating. Is this possible somehow?
Thanks! Goodnight all.Michael King
01/18/2022, 2:41 PMHecki
01/18/2022, 7:23 PMpavi2410
01/19/2022, 8:08 AMsimon.vergauwen
01/19/2022, 9:54 AMTray
. I’m following the tutorial on compose-jb
, but the notification is not showing on my machine. I’m on MacOs BigSur 11.6.
However, I can see that the trayState.sendNotification
is correctly being called.
My build.gradle.kts
is the one from templates/desktop-template
. https://github.com/JetBrains/compose-jb/blob/master/templates/desktop-template/build.gradle.kts (using 1.0.1 version, not rc2)simon.vergauwen
01/19/2022, 9:54 AMTray
. I’m following the tutorial on compose-jb
, but the notification is not showing on my machine. I’m on MacOs BigSur 11.6.
However, I can see that the trayState.sendNotification
is correctly being called.
My build.gradle.kts
is the one from templates/desktop-template
. https://github.com/JetBrains/compose-jb/blob/master/templates/desktop-template/build.gradle.kts (using 1.0.1 version, not rc2)Igor Demin
01/19/2022, 10:12 AMjava
(or for your application, when you ship it as native distribution). Try to open macOs notifications, and there should be a request for it, with button "Allow"simon.vergauwen
01/19/2022, 11:35 AMdmg
, and tried it that way too but that also didn’t work. Although I did get a pop-up requesting if I wanted to allow notifications when I ran the installed dmg
.
I gave both java
, and the installed dmg
permission to send notifications.Igor Demin
01/19/2022, 12:06 PMsimon.vergauwen
01/19/2022, 1:47 PMdmg
. So it could not be 16/17 unless it’s baked into IntelliJ and I missed something (I’m double checking the ticket).Igor Demin
01/19/2022, 2:24 PMjava
some time ago.
Do notifications work in other applications?Gradle/IntelliJ is pointing to JAVA_HOME.When we run via IDEA, IDEA uses JDK that is set in the
Settings/.../Gradle
(see the screenshot).
But even with Java 11 it should work.
If it doesn't work, and all notifications are turned on in the macOs settings, and the other applications are able to send notifications, then it is some rare incompatibility with the notifications mechanism that was implemented by JDK.
By the way, IDEA probably also uses this mechanism. Do notifications work in it?simon.vergauwen
01/19/2022, 2:41 PMdmg
.Igor Demin
01/19/2022, 3:04 PMsimon.vergauwen
01/19/2022, 4:47 PMIgor Demin
01/20/2022, 8:46 AMproject to workWith or without notifications?
simon.vergauwen
01/20/2022, 8:52 AMjava
notifications, and after that it started working. However, I now have 3x java
in my notification settings and not sure what the difference is. (Different JDK versions ?)Igor Demin
01/20/2022, 8:56 AMDifferent JDK versionsYes, those are different JDK versions. Usually Compose applications ship as
dmg
, and they have their own (single) name in Notification settings.simon.vergauwen
01/20/2022, 9:08 AMpackageDmg
.
It should also automatically request to allow notification for it, right? Let me also double check that.