https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-desktop
  • p

    pavi2410

    01/19/2022, 6:16 PM
    Has anyone implemented a UI kit made for desktops? Material design seems unusable on desktops, while it works great for mobile
    d
    c
    +5
    • 8
    • 19
  • m

    Moritz Post

    01/20/2022, 12:12 PM
    Hello. I am using the
    Canvas
    composable in my compose desktop app. I have found that the
    Canvas.onDraw
    method is called multiple times although the size of the canvas has not canged. This leads to jank since the drawing is quite intensive. Next to the canvas i have a couple of items that are clickable() so they show hoover feedback for the mouse cursor. Even just hoovering over these unrelated items triggers a redraw of the canvas. Is there a way to circumvent this redrawing?
    z
    k
    • 3
    • 6
  • c

    Colton Idle

    01/20/2022, 8:01 PM
    Sorta random. I see skia and skiko in a bunch of places. I'm ignorant to what they are and what they mean. Any reasoning behind the name? skiko is an interesting name to me. lol
    j
    b
    +2
    • 5
    • 19
  • s

    Sebastian Kürten

    01/21/2022, 3:51 PM
    I'm thrilled to announce that we just released our first beta version of a peer2peer chat application we're building using compose for desktop. More details in the thread 👇
    :kotlin-intensifies-purple: 6
    🎉 12
    :kotlin-intensifies: 7
    b
    d
    +2
    • 5
    • 18
  • j

    Javier

    01/21/2022, 6:10 PM
    I have seen that
    shadow
    has a different source of light in desktop (left top) respect to Android (center top). I think the common
    Modifier
    should have the same behavior in both platform and if a design system like Material needs to change the position, should create an additional modifier, but not sure if
    shadow
    should be renamed to
    basicShadow
    similar to
    BasicText
    and
    Button
    ➕ 2
    c
    i
    +2
    • 5
    • 16
  • s

    spierce7

    01/22/2022, 12:10 AM
    Currently, if an uncaught exception happens in the app, a dialog is created with an error message based on the message of the exception. How do we stop this behavior and implement our own handling?
    t
    i
    • 3
    • 4
  • u

    谢朋刚

    01/24/2022, 8:49 AM
    When I build a compose-desktop project by Intellij, It sets gradle's vesion to 7.0.1 as default. But i want to set it to 7.2. How can i change this config.
    t
    j
    m
    • 4
    • 10
  • m

    Michael Paus

    01/24/2022, 11:08 AM
    Setting up a multi-platform Compose library project I am just trying to set up a multi-platform Compose library project which I want to install in mavenLocal. I started with a multi-platform Kotlin (Kotlin Gradle DSL) library project template generated by IntelliJ but then I somehow failed to properly add the necessary Compose dependencies. At the moment I am only targeting JVM (desktop) and Android. Can someone show me what is necessary to go from that template to a working one with support for Compose? I am anything else but a Gradle expert.
    d
    g
    • 3
    • 7
  • j

    Javier

    01/24/2022, 11:24 AM
    Why the first
    size
    has preference here`Modifier.size(200.dp).size(400.dp)` and the second is completely ignored?
    a
    • 2
    • 2
  • c

    Colton Idle

    01/24/2022, 4:09 PM
    https://plugins.jetbrains.com/plugin/18439-compose-for-ide-plugin-development-experimental- Should we use this over the plugin template included in the JB compose repo?
    o
    s
    m
    • 4
    • 8
  • c

    Colton Idle

    01/25/2022, 1:35 PM
    I am super excited to see all of the samples updated to use latest AGP. I get these red lines when opening up the project in AS. Should I file a bug against jb-compose... gradle, intellij or AS?
    k
    • 2
    • 4
  • s

    spierce7

    01/25/2022, 4:27 PM
    Does anyone know of a way to alter this icon for the mounted DMG? I thought I filed a ticket around this months ago but I can’t find it.
    b
    o
    +2
    • 5
    • 14
  • j

    Joakim Forslund

    01/25/2022, 5:30 PM
    For a multiplatform project containing android, iOS and js, Is there any way you can continue using
    commonMain
    dependencies for compose and just tell the iOS target not to try finding the dependencies for compose? Or do I need to set up the compose dependencies for each target?
    ➕ 1
    b
    d
    • 3
    • 7
  • z

    zfan93

    01/26/2022, 2:44 AM
    Is there any more information about the compose for iOS now?
    d
    • 2
    • 2
  • j

    John Aoussou

    01/26/2022, 10:06 AM
    I have the same problem as this https://kotlinlang.slack.com/archives/C01D6HTPATV/p1628328836205900 What is the correct way of including Coil in the dependencies?
    f
    • 2
    • 3
  • b

    Ben Woodworth

    01/26/2022, 7:53 PM
    Is there a way to package an application into an EXE that isn't an installer? I want to share something with friends that they can just run without them having to worry about things being installed on their system. I saw mention of installer and app-image exes in this channel, but idk if that's what I'm looking for or where to read up on it
    m
    d
    +2
    • 5
    • 38
  • k

    Kirill Grouchnikov

    01/27/2022, 7:44 PM
    Alpha-dev jumped from 1.1.0 to 1.2.0. Intentional?
    🔥 4
    t
    m
    +3
    • 6
    • 6
  • t

    Tunji Dahunsi

    01/28/2022, 4:16 PM
    I’m trying to build for android using version
    1.2.0-alpha1-dev578
    , but I run into
    Could not find org.jetbrains.compose.foundation:foundation-layout-android-debug:1.2.0-alpha1-dev578
    I can build for desktop just fine. Looking at the dependency history on maven, this hasn’’t been updated in a while: https://mvnrepository.com/artifact/org.jetbrains.compose.foundation/foundation-android-debug I’m not quite sure why it’s only erroring now.
    i
    o
    • 3
    • 6
  • t

    theapache64

    01/31/2022, 7:37 PM
    I’ve the Compose plugin installed in my intelliJ, but
    @Preview
    doesn’t show the ▶️ icon ? 🤔 What am i missing?
    ✅ 1
    d
    • 2
    • 5
  • m

    manueldidonna

    01/31/2022, 11:26 PM
    I want to draw behind the window title bar but I don’t want to worry about having to recreate the window decorations (shape and buttons). Any solution?
    🙌 1
    k
    t
    • 3
    • 4
  • p

    PHondogo

    02/01/2022, 8:24 AM
    Hello! On desktop version of Compose I've faced with this:
    Scaffold(
            drawerContent = {} // if this is commented out then exception will not be raised on right click on TextField
        ) {
            var value by remember { "".toMutableState2() }
            TextField(value, onValueChange = { value = it })
        }
    If right click on TextField exception occurs:
    Exception in thread "AWT-EventQueue-0 @coroutine#40" java.lang.NullPointerException
    	at androidx.compose.foundation.gestures.DragGestureDetectorKt.awaitHorizontalPointerSlopOrCancellation-gDDlDlE(DragGestureDetector.kt:1133)
    	at androidx.compose.foundation.gestures.DragGestureDetectorKt$awaitHorizontalPointerSlopOrCancellation$1.invokeSuspend(DragGestureDetector.kt)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
    	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
    	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
    	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
    	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
    	at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
    	at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:511)
    	at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.dispatchPointerEvent(SuspendingPointerInputFilter.kt:406)
    	at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:419)
    	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:310)
    	at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:179)
    	at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:98)
    	at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:80)
    	at androidx.compose.ui.platform.SkiaBasedOwner.doProcessPointerInput-8iAsVTc(SkiaBasedOwner.skiko.kt:383)
    	at androidx.compose.ui.platform.SkiaBasedOwner.processPointerInput-8iAsVTc$ui(SkiaBasedOwner.skiko.kt:379)
    	at androidx.compose.ui.ComposeScene.sendPointerEvent-aC5X19Y(ComposeScene.skiko.kt:385)
    	at androidx.compose.ui.ComposeScene.sendPointerEvent-aC5X19Y$default(ComposeScene.skiko.kt:354)
    	at androidx.compose.ui.awt.ComposeLayer_desktopKt.onMouseEvent(ComposeLayer.desktop.kt:254)
    	at androidx.compose.ui.awt.ComposeLayer_desktopKt.access$onMouseEvent(ComposeLayer.desktop.kt:1)
    	at androidx.compose.ui.awt.ComposeLayer$4$mouseMoved$1.invoke(ComposeLayer.desktop.kt:178)
    	at androidx.compose.ui.awt.ComposeLayer$4$mouseMoved$1.invoke(ComposeLayer.desktop.kt:177)
    	at androidx.compose.ui.awt.AWTDebounceEventQueue$job$1.invokeSuspend(AWTDebounceEventQueue.desktop.kt:59)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    :thread-please: 4
    o
    • 2
    • 4
  • s

    Sebastian Kürten

    02/01/2022, 11:48 AM
    Does anybody have the proguard setup outlined in the tutorial set up in a real project (I'm getting some errors in the buildscript, so maybe some details aren't 100% working and needs some polishing?) In particular I'm getting "Unresolved reference" for 
    val packageUberJarForCurrentOS by getting
    m
    j
    • 3
    • 15
  • a

    Abdelilah El Aissaoui

    02/01/2022, 1:46 PM
    Hey! Not sure if am I allowed (delete the message if not) but I'd like to share a project with Compose Desktop that I've been working on for quite some time in my free time. It's a Git client based on Compose+JGit. It's still an alpha (still missing quite some features) but feel free to give it a try. PD: The UI/UX need to improve a lot but I haven't got into that yet, I want to have the features ready first. https://github.com/aeab13/Gitnuro/
    👏 8
    👏🏻 2
    👏🏼 1
    👍 1
    :compose-multiplatform: 13
    🎉 19
    🤩 5
    b
    m
    +2
    • 5
    • 18
  • s

    Sebastian Kürten

    02/01/2022, 10:31 PM
    I didn't find an awesome list for compose for desktop, but I think we should have one: https://github.com/sebkur/awesome-compose-for-desktop
    👏 6
    👏🏼 1
    t
    c
    • 3
    • 5
  • d

    Dieter Holz

    02/02/2022, 3:16 PM
    When using the multiplatform-template to set up a new compose for desktop project, I’m not able to create a new package inside
    commonMain
    Using IDEA 2021.3.2 Any advice?
    m
    • 2
    • 1
  • m

    Miquel Àngel Román

    02/03/2022, 9:22 AM
    Hi! Can compose desktop be used natively? I’d like to run a little program on a Raspberry Pi algonside some video libraries
    g
    • 2
    • 1
  • d

    David W

    02/04/2022, 9:35 PM
    If you have a TextField and click it, it gets focus. If you click outside of it on the background, the TextField retains focus, unlike in pretty much every other desktop program (click the message box in Slack, then click anywhere outside of it). 1. Is that actually what happens, or is my project somehow messed up? 2. Is there a way to fix this that isn't "add a modifier to everything to request focus"?
    z
    • 2
    • 1
  • k

    Kirill Grouchnikov

    02/05/2022, 4:36 PM
    A little weekend side project using Compose canvas This is taking daily visit numbers to a Wikipedia page (Prime Number, MRNA, Sourdough) from for the last 4 years, and mapping them to compare yearly and monthly trends, as well as the breakdown by the day of the week So for example the first chart shows that throughout "regular" school year months, visits to the Prime Number page were mostly through the weekdays, and down on the weekends. Then a huge spike in late summer / early fall of 2020 as pretty much all schools went virtual, going into the rest of 2020 and the winter / spring semesters of 2021. And the drop off around Christmas week as everybody is off For MRNA - huge spike when this technology was announced as the basis for the upcoming vaccines in late 2020. And for sourdough - when everybody was baking their own bread right when the shutdowns started in March 2020.
    :not-kotlin: 2
    👍🏻 1
    ❤️ 12
    👍 14
    😃 2
    🙌🏻 1
    🧐 3
    👍🏼 1
    t
    t
    +2
    • 5
    • 7
  • v

    Vishnu Haridas

    02/05/2022, 9:42 PM
    This is more of a Compose Desktop Gradle-level question — How to include secrets (like API keys) in a Compose-Desktop project without committing to Git? For example, we have
    buildConfigField()
    in build.gradle in Android projects, which generates the BuildConfig.java file, and that can be used during runtime. Is there a similar approach in Compose Desktop projects so that I can add secrets as System Env variable (or even a git-ignored properties file) and don't have to commit it? I added a question on StackOverflow just now: https://stackoverflow.com/questions/71002334/compose-desktop-projects-how-to-include-api-keys-or-other-secrets-without-com
    s
    c
    • 3
    • 7
  • t

    therealbluepandabear

    02/06/2022, 12:39 AM
    Hello, Is anyone aware of any good tutorials for getting started with Compose Desktop? Cheers, thebluepandabear
    c
    • 2
    • 1
Powered by Linen
Title
t

therealbluepandabear

02/06/2022, 12:39 AM
Hello, Is anyone aware of any good tutorials for getting started with Compose Desktop? Cheers, thebluepandabear
c

Colton Idle

02/07/2022, 6:04 PM
The jb repo has a couple of good samples, but in general jb compose is just compose, so you can just use an compose tutorial on the web and it'll pretty much just work on desktop.
View count: 2