py
01/07/2021, 6:10 PMpy
01/08/2021, 12:10 AMnfrankel
01/08/2021, 5:09 AMSwingPanel
to use the faithful JTable
• how do you bind the tab key to jump to another field?orangy
01/08/2021, 1:34 PMorangy
01/08/2021, 2:20 PMandroidx.compose.material.Text
vs androidx.compose.foundation.Text
🙂 Not that big deal, but since I use a lot of Image
components, the foundation’s Text comes into place in almost every situation. Do you plan to bring some order into packages/components?orangy
01/08/2021, 2:24 PMimageResource
(composable with remember) vs imageFromResource
(just creates ImageBitmap). In a composable context it’s easy to use the wrong one and cause excessive bitmap creations. Consider renaming one of them to be not so similar and making it more obvious from the name when to use which.orangy
01/08/2021, 4:25 PMbackgroundImage
modifier like this:
@Composable
fun Modifier.backgroundImage(bitmap: ImageBitmap, contentScale: ContentScale = ContentScale.Crop): Modifier {
val imagePainter = remember(bitmap) { ImagePainter(bitmap) }
return paint(imagePainter, false, contentScale = contentScale)
}
But if I do it like this it doesn’t show any content. If I implement my own DrawImageBackgroundModifier
with trivial draw using drawImage and drawContent, it works as expected. What I’m missing?Kirill Grouchnikov
01/08/2021, 4:37 PMeloew
01/08/2021, 7:48 PMfun copyToClipboard(value: String) {
val c = Clipboard("")
val s = StringSelection(value)
c.setContents(s, s)
//Test
val stringValue = c.getData(DataFlavor.stringFlavor)
val data = c.getContents(null)
}
Glenn Martin
01/09/2021, 4:47 AMKirill Grouchnikov
01/09/2021, 10:32 PMsigmadelta
01/10/2021, 8:24 AMGlenn Martin
01/10/2021, 8:48 AMGlenn Martin
01/10/2021, 1:36 PM@ExperimentalLayout
@Composable
fun mainLayout(view: @Composable () -> Unit) {
Row(Modifier.fillMaxSize()) {
Box(modifier = Modifier.fillMaxWidth(0.2f), contentAlignment = Alignment.Center) {
sideBarItems()
}
view()
}
}
this works on first load, but when i call this from an onClick() event on those sidebar items I get an error about calling composable from an onclick()Colton Idle
01/10/2021, 7:45 PMsuresh
01/10/2021, 11:05 PM6.8
+ Kotlin 1.4.21-2
+ Compose 0.3.0-build13
+ OpenJDK15
and getting this weird error on compilation. Has anybody seen this error earlier? Haven't seen this issue with regular kotlin projects though.
e: java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel
at org.jetbrains.kotlin.com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
at org.jetbrains.kotlin.com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.<init>(KotlinCoreEnvironment.kt:118)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:420)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:226)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:152)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
Thomas
01/11/2021, 12:26 PMSrSouza
01/11/2021, 1:49 PMmzgreen
01/11/2021, 8:49 PMpy
01/12/2021, 12:38 AMsigmadelta
01/12/2021, 12:02 PMbuild.gradle.kts
file for a Compose-Desktop submodule would look like as well?py
01/12/2021, 7:09 PMThomas
01/12/2021, 8:01 PMAru
01/12/2021, 11:19 PMSuser
01/13/2021, 7:40 AMMarek Venc
01/13/2021, 9:48 PMSuser
01/14/2021, 5:21 AMAnimesh Sahu
01/14/2021, 8:14 AMolonho
01/14/2021, 2:10 PMAnimesh Sahu
01/14/2021, 4:06 PMAppWindow.close()
calls System.exit() or something, and process exits immediately, anyway to stop that (still closing the window, but not let process die)?Animesh Sahu
01/14/2021, 4:06 PMAppWindow.close()
calls System.exit() or something, and process exits immediately, anyway to stop that (still closing the window, but not let process die)?Kirill Grouchnikov
01/14/2021, 4:08 PMAnimesh Sahu
01/14/2021, 4:13 PMKirill Grouchnikov
01/14/2021, 4:16 PMAnimesh Sahu
01/14/2021, 4:18 PMKirill Grouchnikov
01/14/2021, 4:20 PMwindowClosing
callback for cleaning up. But if you want to leave your daemon running in the background, that's a completely different area.Animesh Sahu
01/15/2021, 3:44 AMSebastian Sellmair [JB]
01/15/2021, 9:25 AMKirill Grouchnikov
01/15/2021, 2:50 PMAnimesh Sahu
01/15/2021, 2:53 PMFile -> Quit
(or Ctrl+Q) is for quitting the app.Kirill Grouchnikov
01/15/2021, 2:57 PM