spierce7
11/11/2020, 9:37 PMspierce7
11/12/2020, 2:39 AMColumn(
Modifier
.fillMaxSize()
.padding(20.dp)
) {
Text(
text = "Test test test asdfasdfa sfj aslf lajsdlf jlajdsfl jlasjf jaslkfj klajdfl jaslf lkasjfljaslk f",
style = typography.h3,
color = Color.White,
textAlign = TextAlign.End,
modifier = Modifier.background(Color.Black),
)
}
Se7eN
11/12/2020, 8:12 AMdrawLayer(rotationY = 35f, transformOrigin = TransformOrigin(0))
but it doesn't look 3d. Do I have to scale or something like that? I tried different scale values but no luck.mayojava
11/12/2020, 10:01 AMVadim Kapustin
11/12/2020, 11:51 AM@Composable
fun IconWithHint(
asset: ImageAsset,
modifier: Modifier = Modifier,
tint: Color = AmbientContentColor.current,
hint: @Composable() () -> Unit
) {
val entered = remember { mutableStateOf(false) }
Box {
Icon(asset,
modifier.pointerMoveFilter(
onEnter = {
entered.value = true
false
},
onExit = {
entered.value = false
false
}
),
tint
)
if (entered.value) hint()
}
}
spierce7
11/12/2020, 3:27 PMMichał Kalinowski
11/12/2020, 5:37 PMMahdi Safarmohammadloo
11/12/2020, 6:17 PMFoso
11/12/2020, 6:29 PMsuresh
11/12/2020, 10:03 PMAdrianTodt
11/13/2020, 12:32 AMsuresh
11/13/2020, 7:41 AMcom.intellij.psi.stubs.UpToDateStubIndexMismatch: PSI and index do not match.
Please report the problem to JetBrains with the files attached
INDEXED VERSION IS THE CURRENT ONE file=KtFile: ProduceStateScopeImpl.class, file.class=class org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile, file.lang=Language: kotlin, modStamp=1
AST INCONSISTENT, perhaps after incremental reparse; KtFile: ProduceStateScopeImpl.class
stub debugInfo=created in getStubTree(), with AST = false; with backReference
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PsiJetFileStubImpl[package=androidx.compose.runtime]}1615692120
same size=true
debugInfo=created from index; with backReference
viewProvider=org.jetbrains.kotlin.idea.decompiler.KotlinDecompiledFileViewProvider{vFile=jar:///Users/xxx/.gradle/caches/modules-2/files-2.1/org.jetbrains.compose.runtime/runtime-desktop/0.1.0-build113/3210ec4f762a877390f2b6462f3919cd3a6580e9/runtime-desktop-0.1.0-build113.jar!/androidx/compose/runtime/ProduceStateScopeImpl.class, vFileId=1202084, content=VirtualFileContent{size=5451}, eventSystemEnabled=true}
viewProvider stamp: 0; file stamp: 0; file modCount: 1605036751442; file length: 5451
doc saved: true; doc stamp: 0; doc size: 772; committed: true
indexing info: indexing timestamp = 1605036751442, binary = true, byte size = 5451, char size = -1
at com.intellij.psi.stubs.StubTreeLoader.handleUpToDateMismatch(StubTreeLoader.java:135)
Fudge
11/13/2020, 11:37 AMVadim Kapustin
11/13/2020, 11:53 AMAnimesh Sahu
11/13/2020, 2:01 PMval shape = GenericShape { size ->
moveTo(size.width / 2f, 0f)
lineTo(size.width, size.height)
lineTo(0f, size.height)
}
After copy pasting the triangle shape (which I'm going to change later), I don't have idea of how to draw it.
Shape seems to be a parameter of Modifier.border
, Modifier.drawLayer
, so I tried, but nothing works 😛 :
fun main() =
Window(
title = "Compose for Desktop",
size = IntSize(300, 300),
) {
DesktopMaterialTheme(
colors = lightColors(background = Color.Cyan),
) {
Box(modifier = Modifier.border(5.dp, Color.Cyan, shape))
}
}
Any thoughts?Dominaezzz
11/14/2020, 11:28 AMKirill Grouchnikov
11/15/2020, 8:39 PMAppWindowAmbient.current.y
gives the top location of the current desktop window. Is there a way to get the vertical offset from the window top for Canvas
or DrawScope
? That would allow doing vertical gradients across multiple composables without trying to place them into a common container.Kirill Grouchnikov
11/15/2020, 9:12 PMGreg Steckman
11/15/2020, 10:30 PMandylamax
11/17/2020, 3:26 PMalorma
11/17/2020, 4:26 PMalorma
11/17/2020, 5:06 PMColumn(
modifier = Modifier.padding(16.dp),
) {
Surface(
elevation = 4.dp,
modifier = Modifier.clip(MaterialTheme.shapes.medium)
.background(color = MaterialTheme.colors.primary)
.clickable {}
.padding(8.dp)
) {
Text(text = "${repo.owner.login}/${repo.name}")
}
}
Paul Nogas
11/17/2020, 7:14 PMKirill Grouchnikov
11/17/2020, 7:32 PMZach Klippenstein (he/him) [MOD]
11/17/2020, 11:43 PMKyant
11/18/2020, 4:56 AMPaul Woitaschek
11/18/2020, 10:36 AMjava {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
But when running from the command line:
./gradlew run
It shows an error:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: org/jetbrains/skiko/Library has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Vadim Kapustin
11/18/2020, 11:32 AMIcon(imageFromResource("images/logo.png"))
But sometimes, when the system is under heavy load I have NullPointerException in DesktopImageAssetKt.loadResource()
Apparently the icon doesn't have time to load...
How to make waiting for the icon to load and then display it?bjonnh
11/18/2020, 2:50 PMTimo Drick
11/19/2020, 1:55 PM