Konyaco
03/21/2021, 2:33 AMtheapache64
03/21/2021, 7:43 AMCanvas
? Can anyone show me some sample code?Arkadii Ivanov
03/21/2021, 12:19 PMDanish Ansari
03/21/2021, 2:25 PMRow
with some Text
and IconButton
but IconButton
is going outside the Row
, no idea why?
Row(
modifier = Modifier.fillMaxWidth().border(1.dp, Color.Red).padding(8.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = <http://Alignment.Top|Alignment.Top>,
) {
VeryBigText(modifier = Modifier.border(1.dp, Color.Yellow))
IconButton( onClick = {}, modifier = Modifier.requiredSize(24.dp).border(1.dp, Color.Green)) {
Icon(
Icons.Default.Close,
contentDescription = "Dismiss",
modifier = Modifier.requiredSize(16.dp)
)
}
}
What am I doing wrong?Yan Pujante
03/21/2021, 3:11 PMRow(Modifier.background(color = MaterialTheme.colors.primary)) {
Text(
tabSelected.toString(),
color = MaterialTheme.colors.onPrimary,
style = MaterialTheme.typography.h6,
modifier = Modifier.padding(10.dp).weight(1f)
)
}
How can I get the size (width and height) of the row after it is rendered?orangy
03/21/2021, 5:45 PMEric Chee
03/21/2021, 9:14 PMgbaldeck
03/21/2021, 10:26 PMpackageMsi
task. packageMsi
works fine when run by itself, but when I run my task that depends on it packageMsi
fails with
A problem was found with the configuration of task ':packageMsi' (type 'AbstractJPackageTask').
File 'C:\my_workspace\grim-locations\build\compose\default-icons\0.4.0-build173\icon-windows.ico' specified for property 'iconFile' does not exist.Has anyone else experienced this?
Olivier Patry
03/21/2021, 10:56 PMDisposableEffect
to cleanup some resources hosted by a state object.
When I close the window using the system close button, my onDispose {}
isn't called (but `Window`'s onDismissRequest {}
is).
Is it expected? I feel it buggy, I would expect composable being disposed explicitly, no?zhuinden
03/22/2021, 7:49 AMtheapache64
03/22/2021, 8:27 AMYan Pujante
03/22/2021, 2:54 PM@Composable
calls). I am not seeing it in IntelliJ Utlimate 2020.3.3. Is there a way to add such an entry?Sergey Y.
03/22/2021, 3:19 PMOlivier Patry
03/22/2021, 5:10 PMOlivier Patry
03/22/2021, 10:28 PMDropdownMenu
positioning.
x
coordinate of the menu is correct but the vertical position is wrong always stick to the bottom of the window.
It seems close to https://github.com/JetBrains/compose-jb/issues/195 which is closed though. And the mechanic wasn't the same as of now it seems.
You can see in the :thread-please: the details (code & screenshots)TheMrCodes
03/22/2021, 10:31 PMLocalSaveableStateRegistry
to store Scrolle state and simular values across the whole application? And if thats the case can anyone describe how it's API is intendet to be used / whats its lifecycle is? Findings in the 🧵Chris Sinco [G]
03/23/2021, 2:25 AMsvgResource
function expected to work in the context of a Compose Desktop app running in an IntelliJ plugin? I tried adding a simple SVG into the resources
directory, using the IDEA plugin example, then referenced it in an Icon
. I get this error now from openResourceStream
java.lang.IllegalArgumentException: Resource circle.svg not found
at androidx.compose.ui.res.Resources_desktopKt.openResourceStream(Resources.desktop.kt:23)
at androidx.compose.ui.res.DesktopSvgResources_desktopKt.svgResource(DesktopSvgResources.desktop.kt:48)
at com.jetbrains.compose.ComposableSingletons$ComposeDemoActionKt$lambda-1$1.invoke(ComposeDemoAction.kt:60)
at com.jetbrains.compose.ComposableSingletons$ComposeDemoActionKt$lambda-1$1.invoke(ComposeDemoAction.kt:54)
Michał Kalinowski
03/23/2021, 8:34 AMsonder-joker
03/23/2021, 10:06 AMAppManager.focusedWindow?.close()
the loading animation windowss, it will entirely exit
What's the best way to solve it?Dan Peluso
03/23/2021, 6:07 PMcompose-jb/templates/multiplatform-jb
to build on my machine. I have the project SDK set to Java 11, but every time I sync my build.gradle.kts
, the build shows me errors on the (common) and (android) build.gradle.kts. It looks like something is wrong with how I'm importing the SDK, or maybe I have a project structure field wrong. Does this look familiar to anybody else? Cloned the most up-to-date repo and for the life of me I cannot get it to build (with zero code changes) errors in threadYan Pujante
03/23/2021, 7:00 PM-ea
).Shalaga44
03/24/2021, 5:00 AMSurface(modifier = Modifier.fillMaxSize()) {
Box {
Canvas(Modifier.fillMaxSize()) {
val midWidth = size.width / 2
val midSpace = 200f * density
val leftPoint = midWidth - (midSpace / 2)
val rightPoint = midWidth + (midSpace / 2)
val leftPath = Path().apply {
moveTo(size.width, 0f)
lineTo(rightPoint, 0f)
lineTo(leftPoint, size.height)
lineTo(size.width, size.height)
close()
}
val rightPath = Path().apply {
moveTo(0f, 0f)
lineTo(rightPoint, 0f)
lineTo(leftPoint, size.height)
lineTo(0f, size.height)
close()
}
drawPath(leftPath, Color.Red)
drawPath(rightPath, Color.Black)
}
val text = "ABILITY TO"
Text(
text = text,
textAlign = TextAlign.Center,
modifier = Modifier.align(Alignment.Center),
style = MaterialTheme.typography.h1,
fontWeight = FontWeight.Bold,
color = Color.Black
)
Text(
text = text,
textAlign = TextAlign.Center,
modifier = Modifier.align(Alignment.Center),
style = MaterialTheme.typography.h1,
fontWeight = FontWeight.Bold,
color = Color.Red,
)
}
}
romainbsl
03/25/2021, 11:23 AMromainbsl
03/25/2021, 2:51 PMPHondogo
03/25/2021, 4:08 PMgbaldeck
03/26/2021, 3:18 AMTlaster
03/27/2021, 3:44 PMtheapache64
03/27/2021, 4:01 PMCLOVIS
03/28/2021, 9:04 AMgetUser(): Result<User>
, what is the idiomatic way of displaying that in the UI?
Before error handling was necessary, I had something like:
val (user, setUser) = remember { mutableStateOf<User?>(null) }
Button(onClick = { scope.launch { setUser(getUser()) } })
if (user != null)
// display the user
But now that there's a Result in the way, I'm unsure what would be the “compose way” of doing things.Yan Pujante
03/28/2021, 3:51 PMYan Pujante
03/28/2021, 3:51 PMIgor Demin
03/28/2021, 4:23 PMYan Pujante
03/28/2021, 5:20 PM