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
  • m

    makobernal

    04/14/2021, 5:16 PM
    Hello, perhaps this is too broad of a question, but, is there any good book that goes through the principles of writing desktop apps? Coming from years of working on distributed backend systems (think spring, webapps) I find myself very lost on how to structure a desktop app (or what does a desktop app really need).
    👍 1
    ❓ 1
    o
    • 2
    • 3
  • s

    samuel

    04/14/2021, 10:12 PM
    While working with a
    LazyColumn
    with a
    VerticalScrollBar
    , i’m using
    rememberScrollbarAdapter
    as the adapter and it requires
    averageItemSize
    . I could imagine this works fine when the items are expected to be the same size. How do i handle the case when items might not be the same size. Is there an alternative i might have missed?
    c
    d
    y
    • 4
    • 8
  • m

    Marc Plano-Lesay

    04/15/2021, 9:55 AM
    Are there any plans to provide a platform specific look and feel? E.g. a Windows theme, an integration with the GTK theming system... in order to have a more integrated looking app
    o
    o
    +3
    • 6
    • 11
  • g

    Graham Dean

    04/15/2021, 9:58 AM
    Hi, I'm building my desktop app to an MSI but when I run the .exe, nothing happens (the executable just exits immediately). I suspect there are some dependencies missing from the installed files. My app uses
    javafx
    and my build.gradle.kts has these dependencies in it. If I rip out the
    javafx
    dependencies and associated code, the app installs and runs fine. 1) How can I package up my app to run with javafx?, and 2) is there a way to diagnose the running of the .exe issue (e.g. any diagnostics or logs to view)? build.gradle.kts excerpts:
    plugins {
        kotlin("jvm") version "1.4.30"
        id("org.jetbrains.compose") version "0.3.0"
        id("org.openjfx.javafxplugin") version "0.0.9"
    }
    ...
    javafx {
        modules("javafx.controls", "javafx.swing", "javafx.media")
    }
    Thanks!
    o
    a
    • 3
    • 6
  • b

    Bruno Blazinc

    04/15/2021, 1:06 PM
    Hi, does anyone know of a way to debug or log to console a packaged Mac app made with Compose Desktop? When I run the runDistributable task my app works as intended, but when I run packageDmg and use the resulting app it seems that there is an issue with the SQL database, ViewModel or something related to data persistence.
    t
    a
    • 3
    • 2
  • o

    Olivier Patry

    04/15/2021, 10:24 PM
    Just for learnability, I was migrating a reaaaaaaaally old toy project/game I did few years ago. I tend to replace the AWT UI by Compose. It's a really simple game, no big deal here. The impl of the logic layer was using Java `Observer`/`Observable`, I try to keep it as is for now (keeping compatibility with old Java/AWT UI layer). How may I recompose what needs to be based on such impl?
    z
    u
    • 3
    • 16
  • s

    sonder-joker

    04/16/2021, 6:55 AM
    what is the best way to make a Rect clickable in canvas?
    z
    • 2
    • 3
  • s

    smallshen

    04/16/2021, 7:06 AM
    does any one successfully generates native image of jetpack compose desktop app with graalvm?
    s
    s
    • 3
    • 7
  • s

    spierce7

    04/16/2021, 6:59 PM
    Does anyone have recommendations for how to protect a Kotlin desktop application from being reverse engineered? Proguard is an obvious step. What else?
    :google: 1
    :not-kotlin: 1
    👍 2
    r
    s
    • 3
    • 2
  • r

    rnett

    04/16/2021, 11:20 PM
    I have a multiplatform project with two JVM source sets: a Ktor server and a Compose frontend. When I compile the server, I get
    You are using an outdated version of Compose Runtime
    errors from compose, I assume because the plugin it applying itself to all modules. Is there a way to disable compose for some modules? I don't have access to
    buildFeatures
    afaik since I'm not using android.
    p
    • 2
    • 2
  • e

    Eli

    04/17/2021, 12:28 AM
    High-level question: I'm trying out
    compose-desktop
    in a side project of mine (so I'm really new to this tool), and I'd like to be able to integrate it with a 3rd party rendered component (specifically
    lets-plot
    ). I see that the component specifies that it can be rendered with JavaFX and Apache Batik but I'm not seeing a way to be able to render the component using the compose desktop API. I was assuming there would be some sort of panel I could use to be able to position the graph, and then let the component handle the rendering, but perhaps I'm wrong. Does anyone here have any ideas of what I am missing, or is this even possible?
    j
    • 2
    • 2
  • s

    SrSouza

    04/17/2021, 5:35 PM
    Hi folks, I have a Low level idea here: I want to do a Server Side rendering of Compose Desktop app using Skiko Software render, the idea is to send the Skia Canvas output through the network, this could be doable? Any one can give me some ideas in how can I accomplish this?
    s
    m
    t
    • 4
    • 9
  • a

    Aaron Yoder

    04/17/2021, 8:12 PM
    Question about
    androidx.compose.ui.input.mouse.MouseScrollEvent
    and
    MouseScrollUnit
    : I am using a
    mouseScrollFilter
    and am wanting to perform some mathematical operations using the
    delta
    (for zoom on scroll), but I can't seem to figure out how to get the actual value from the
    delta
    , there's no accessors or anything for the raw Float value. I understand there's the line/page scroll values but those don't seem accessible either, so not sure if I'm just thinking about this incorrectly.
    i
    • 2
    • 2
  • c

    Carter

    04/18/2021, 12:40 PM
    Is anyone signing and notarizing their compose desktop macOS app? There seems to be a regression after upgrading from compose 0.3.1 and Kotlin 1.4.30 to compose 0.4.0-build182 and Kotlin 1.4.32 It compiles, signs, and uploads, but notarization is rejected by Apple a few minutes later. When I dig into the server logs from Apple, the error message is
    "statusSummary": "Archive contains critical validation errors",
    and
    "message": "The signature of the binary is invalid.",
    If I roll back to compose 0.3.1 and Kotlin 1.4.30, then the signing issue goes away again. Is signing broken with the newer version, or did something change with how we’re supposed to configure the gradle build DSL for signing?
    ➕ 2
    o
    a
    • 3
    • 6
  • t

    Timo Drick

    04/18/2021, 5:23 PM
    Some kind of hot reload is now available :-D https://gitlab.com/compose1/livecomposable Please keep in mind that this is still under heavy development. Also it needs some input from you how we could improve this.
    screencast1.mp4
    😱 7
    :kotlin-intensifies: 45
    🆒 8
    c
    s
    o
    • 4
    • 9
  • m

    mzgreen

    04/19/2021, 12:29 PM
    Does Compose Desktop require JDK 15 now? Or it should work on 11? I've just downloaded newest IntelliJ CE and created an empty compose project using intellij wizard and it doesn't run. I'm getting some class loading errors. I have jdk 11 configured on my system but maybe something has changed and now compose requires newer version?
    j
    a
    +3
    • 6
    • 12
  • v

    v79

    04/19/2021, 7:05 PM
    Apologies - can anyone explain what I need to do to fix this message:
    Functions which invoke @Composable functions must be marked with the @Composable annotation
    - I can't mark
    main
    as composable; I tried moving the body of my application into a separate @Composable function, but I feel like I'm missing some key understanding here.
    c
    c
    • 3
    • 4
  • t

    TheMrCodes

    04/20/2021, 12:40 AM
    Maybe I missed something completly obvious but I tried to create an lazy list from the return of a flow but the State dosn't get updated Code in the 🧵 [SOLVED]
    z
    t
    • 3
    • 23
  • z

    Zach Klippenstein (he/him) [MOD]

    04/20/2021, 4:21 PM
    I seem to remember seeing a tutorial or sample or something once for writing an IntelliJ plugin’s UI with Compose. I can’t figure out the right things to google apparently – does anyone know where to find this? Or did I just imagine it?
    k
    c
    +2
    • 5
    • 10
  • c

    Colton Idle

    04/20/2021, 7:34 PM
    Didn't see this here and thought it was cool https://github.com/supertechninja/Jetpack-Compose-Theme-Configurator
    🤩 5
    c
    j
    • 3
    • 11
  • v

    v79

    04/20/2021, 8:23 PM
    Has JB wrapped Skia in some inaccessible way? I'm trying to convert a Skia Bitmap (for a Canvas) to black and white; all my searching returns methods like `
    Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
    But there is no createBitmap function available. Nor pretty much any of the Android Bitmap functions.
    k
    o
    • 3
    • 2
  • n

    NurBahnhof

    04/20/2021, 8:50 PM
    There is no suggestModules gradle task in the default jetpack compose project created from Project Wizard. What am I missing?
    a
    • 2
    • 1
  • c

    Ch8n

    04/23/2021, 7:58 PM
    Guys are there a way to include firebase features such as remote config, analytics, and crashlytics into a jetpackCompose desktop ? or any alternatives?
    d
    s
    +3
    • 6
    • 8
  • h

    Halil Ozercan

    04/23/2021, 11:08 PM
    Having fun with the new WSLg. Running compose desktop on linux on windows 🙂
    😎 1
    🎉 1
    :window: 6
    z
    t
    b
    • 4
    • 5
  • t

    theapache64

    04/24/2021, 6:33 PM
    I've been using compose-desktop for 3 months in some of my pet projects. here's my experience so far 👍 Framework Stability : :large_green_circle::large_green_circle::large_green_circle::large_green_circle:⚪ 🤗 Community Support : :large_green_circle::large_green_circle::large_green_circle::large_green_circle::large_green_circle: 🔀 Cross-platform Stability : :large_green_circle::large_green_circle::large_green_circle::large_green_circle:⚪ ⛓️ App Size : :large_green_circle::large_green_circle::large_green_circle:⚪⚪ 🚀 DX (Developer Experience 😛 ) : :large_green_circle::large_green_circle::large_green_circle::large_green_circle::large_green_circle:
    :large_green_circle: 3
    🎉 34
    o
    • 2
    • 1
  • m

    Marcin Bak

    04/24/2021, 10:58 PM
    Is there a way to retrieve a composable's bounds relative to application's window?
    t
    • 2
    • 2
  • i

    Icyrockton

    04/25/2021, 1:18 AM
    Is there a way to draw centered text on canvas? I can find solution in Android compose. but on the desktop, the
    Paint
    class is different
    👀 1
    a
    t
    s
    • 4
    • 5
  • c

    Chris Overcash

    04/25/2021, 2:14 PM
    is there support for tabbing through a form? i'm looking through
    androidx.compose.ui.focus
    , but the documentation is a little sparse.
    o
    • 2
    • 2
  • n

    natario1

    04/25/2021, 4:56 PM
    Is it possible to work on compose desktop through Android Studio? I'm trying to setup a hello world app but running into several issues like this one . I think I should specify the correct JDK but Android Studio does not seem to have the handy JDK version dropdown in Project Structure.
    o
    c
    +3
    • 6
    • 18
  • t

    TheMrCodes

    04/25/2021, 8:18 PM
    Native Distribution Error: I've used the packageExe Gradle Task to create a distribution for a Windows system it installs perfectly but when executed is throws the attached exception. The build file will be in the Thread 🧵 [SOLVED]
    ➕ 1
    s
    • 2
    • 3
Powered by Linen
Title
t

TheMrCodes

04/25/2021, 8:18 PM
Native Distribution Error: I've used the packageExe Gradle Task to create a distribution for a Windows system it installs perfectly but when executed is throws the attached exception. The build file will be in the Thread 🧵 [SOLVED]
➕ 1
build.gradle.kts
s

suresh

04/25/2021, 8:51 PM
java.naming
module is missing in the packaged app. Add
java.naming
in modules section - https://github.com/JetBrains/compose-jb/tree/master/tutorials/Native_distributions_and_local_execution#configuring-included-jdk-modules
👍 2
t

TheMrCodes

04/25/2021, 9:09 PM
Got it working Thanks
View count: 4