https://kotlinlang.org logo
Docs
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
  • r

    Ralph Ordanza

    12/08/2022, 12:30 AM
    Is there a way to customize the
    Tray
    ?
  • p

    Pablo

    12/08/2022, 11:06 AM
    Does exist something similar to "Toast" for displaying simple notifications or bubbles to the user in Compose Desktop?
    h
    t
    • 3
    • 6
  • h

    HIGAN

    12/08/2022, 11:24 AM
    For someone want to implement custom title bar in compose desktop: 1. the JetBrains/JetBrainsRuntime is required 2. Access
    java.awt.Window$CustomWindowDecoration
    by reflection, maybe you need
    Unsafe
    to access it in
    JBR-17
    There are some sample codes for it: 1. CustomWindowDecorationAccessing 2. UnsafeAccessing 3. JBWindow and MainToolBar in different platform 4. About JetBrainsRuntime 5. Screenshots
    a
    • 2
    • 1
  • e

    eygraber

    12/08/2022, 2:49 PM
    Is the long term plan to replace awt with skiko (to whatever extent possible)?
    j
    a
    • 3
    • 5
  • a

    Arjan van Wieringen

    12/09/2022, 6:27 PM
    Whats the preferred method of adding a CoroutineScope to a Viewmodel in Desktop code? In Android we have the lifecycle aware ones. I want to instantiate the ViewModel via Koin or KodeinDI in the Composable. But how do I pass a Composable scoped CoroutineScope which will get cancelled when the Composable is removed?
    h
    c
    +2
    • 5
    • 15
  • g

    Guilherme Delgado

    12/12/2022, 4:26 PM
    As a little challenge I’ve created a Desktop App to help me debug the UI State from my Android app. Having the possibility to use jb-compose (and the knowledge from Jetpack Compose) was a game changer! If you have the time, find more information here: https://github.com/GuilhE/JsonBroadcaster. 🙂
  • a

    Alexander Maryanovsky

    12/12/2022, 5:21 PM
    I feel that the decision to implement tooltips via composition is not the best idea. It interferes with the layout by forcing a Box where I didn’t want one.
    c
    • 2
    • 5
  • c

    Casey Brooks

    12/12/2022, 7:36 PM
    Are there any snapshot builds published for Jewel? Or would the recommendation right now be to just copy the sources into my project to try out for my Intellij plugin?
    i
    s
    • 3
    • 4
  • j

    John O'Reilly

    12/13/2022, 12:46 PM
    Is there Compose Desktop version atm that works with Kotlin 1.8.0-RC?
    l
    t
    • 3
    • 12
  • j

    Jan

    12/14/2022, 6:21 PM
    Hey I know that I can load a svg file from the file system using painterResource, is it possible to display an SVG when e.g. having the raw data as a string?
    e
    c
    m
    • 4
    • 11
  • e

    enighma

    12/14/2022, 11:16 PM
    Cache data file location As part of my app I want to create some files to cache data and/or save configurations. Is there a preferred way to do this? I naively created a folder in the root and added files there, which ofc works when running from the IDE, but when I run as a MacOS app it's not happy, and I imagine it either being a file permission issue or that I'm not allowed to create a folder in that location, which in some sense also is permission related.
    c
    • 2
    • 5
  • p

    Pablo

    12/15/2022, 2:45 PM
    Is something wrong with the SnackBar test code from the official guide? I'm trying to display one in Compose-Desktop and does not work, nothing appears on the screen:
    @Composable
    fun test() {
        val scaffoldState = rememberScaffoldState()
        val scope = rememberCoroutineScope()
        Scaffold(
            scaffoldState = scaffoldState,
            floatingActionButton = {
                var clickCount by remember { mutableStateOf(0) }
                ExtendedFloatingActionButton(
                    text = { Text("Show snackbar") },
                    onClick = {
                        // show snackbar as a suspend function
                        scope.launch {
                            scaffoldState.snackbarHostState.showSnackbar("Snackbar # ${++clickCount}")
                        }
                    }
                )
            },
            content = { innerPadding ->
                Text(
                    text = "Body content",
                    modifier = Modifier.padding(innerPadding).fillMaxSize().wrapContentSize()
                )
            }
        )
    }
    Maybe is not compatible with Compose-Desktop?
    i
    • 2
    • 2
  • m

    martmists

    12/15/2022, 5:35 PM
    How do I pass the
    -dontwarn
    option to proguard? edit: It seems someone reacted with "Not Kotlin", but this is quite literally from the Compose plugin. There's no
    proguard.gradle.ProGuardTask
    as the proguard docs would suggest, and the compose docs also don't mention how to customize it.
    j
    • 2
    • 1
  • p

    Pablo

    12/16/2022, 5:41 PM
    Hi, does someone have any official or good guide link about how to use MVVM (ViewModel) in compose-desktop? Thank you.
    m
    e
    c
    • 4
    • 8
  • p

    Pablo

    12/16/2022, 7:07 PM
    Which is the best architecture to work with compose-desktop? maybe MVC or MVP are better than MVVM this time?
    p
    e
    +2
    • 5
    • 53
  • d

    Daniyar Mukhanov

    12/19/2022, 6:15 AM
    is there firebase crashlytics analog for compose desktop?
    a
    c
    r
    • 4
    • 6
  • i

    ianbrandt

    12/21/2022, 9:54 PM
    Is any part of the IntelliJ New UI being implemented with Compose Desktop, or is it all Swing still?
    c
    • 2
    • 1
  • e

    enighma

    12/22/2022, 1:26 AM
    Async image loading I did a quick search and didn't find anything here, but I'm curious if people use a library or some expect/actual implementation for async image loading?
    m
    s
    • 3
    • 10
  • p

    Pablichjenkov

    12/23/2022, 7:33 AM
    Are you recomposing/redrawing on window size change?
    t
    a
    n
    • 4
    • 16
  • m

    Marc Ivan Lim

    12/23/2022, 9:09 AM
    Hello guys, does anyone here have tried to apply TTS ( Text To Speech ) on their desktop compose project?
    m
    • 2
    • 4
  • a

    Arjan van Wieringen

    12/23/2022, 1:54 PM
    I am getting crashes when using the @Preview annotation in IntelliJ and using Duration methods. These have been stabilized in Kotlin 1.6 and my app runs fine when just building. Apparently Compose preview runs on 1.5.30? Does anyone know where I can change that?
    d
    • 2
    • 2
  • l

    Landry Norris

    12/23/2022, 3:31 PM
    I’m using compose multiplatform in one of my projects at work, and I can’t get the AS Dolphin Layout Inspector to work. I’ve added
    compose.uiTooling
    to my androidMain and enabled view attributes in developer settings, but whenever I check the Layout Inspector, I only see the top view. When I expand it, I only see DisposableEffect and two SideEffects (which I’m not directly using).
    d
    • 2
    • 1
  • a

    Alexander Maryanovsky

    12/24/2022, 10:20 AM
    Any way to show a
    wrapContentWidth
    snackbar? Fixed-width works, but not wrap. The default
    fillMaxWidth
    behavior isn’t really appropriate for the desktop.
    d
    • 2
    • 1
  • l

    Loney Chou

    12/25/2022, 3:33 PM
    How do you achieve smooth scroll on desktop?
    k
    • 2
    • 3
  • r

    Russell Kenmuir

    12/25/2022, 11:33 PM
    .
  • d

    Daniyar Mukhanov

    12/26/2022, 9:47 AM
    hi all, is there WorkManager analog in windows? (to make server sync periodically)
    d
    a
    • 3
    • 2
  • s

    sigmadelta

    12/26/2022, 10:25 PM
    FYI - I managed to resolve it using an independent
    common
    module to act as a shared repo between the separate
    backend
    module and the Kotlin Multiplatform module. But for future reference it could be interesting to expose the
    commonMain
    module, or ideally even just allow multiple instances of a type inside the Multiplatform setup 😉 .
    d
    b
    • 3
    • 3
  • s

    Sean Proctor

    12/28/2022, 9:31 AM
    Has anyone managed to create a
    Popup
    on Compose for desktop that works like a
    Dialog
    on Compose for Android? I'm missing two features: shading the content behind the
    Popup
    and clicking on that content dismissing it without also having clicking on the
    Popup
    itself causing it to be dismissed.
    androidx.compose.material.AlertDialog
    doesn't do either of these.
    d
    • 2
    • 3
  • p

    ptmt

    12/28/2022, 6:06 PM
    Does someone know any relatively polished real-life example of Compose Desktop app, doesn't matter whether it's open sourced or not?
    j
    t
    +4
    • 7
    • 9
  • p

    Pablichjenkov

    12/30/2022, 4:23 AM
    After moving kotlin code belonging to a
    jvm/android
    project to a
    multiplatform(jvm/android/ios/js)
    project, I get the following compile error:
    Task :compileKotlinJs FAILED
    e: Unresolved reference: javaClass
    and
    Task :compileKotlinUikitX64 FAILED
    e: Unresolved reference: javaClass
    Is there any equivalent to javaClass in kotlin native. Or something that return the name of the class. I need it for debuging purposes
Powered by Linen
Title
p

Pablichjenkov

12/30/2022, 4:23 AM
After moving kotlin code belonging to a
jvm/android
project to a
multiplatform(jvm/android/ios/js)
project, I get the following compile error:
Task :compileKotlinJs FAILED
e: Unresolved reference: javaClass
and
Task :compileKotlinUikitX64 FAILED
e: Unresolved reference: javaClass
Is there any equivalent to javaClass in kotlin native. Or something that return the name of the class. I need it for debuging purposes
View count: 37