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

    Sololo

    05/25/2021, 12:38 PM
    how to Log msg?
    i
    • 2
    • 2
  • b

    Brian G

    05/25/2021, 1:09 PM
    Is there any proper way to share Android & Desktop sources yet? Most of my components will be the same. As far as I can tell, we can't use a common source set because the desktop/android dependencies are different, even though the APIs are mostly identical
    j
    u
    • 3
    • 15
  • s

    Sololo

    05/25/2021, 1:10 PM
    WARNING: Using incubator modules: jdk.incubator.jpackage
    java.lang.IllegalArgumentException: jdk.incubator.jpackage.internal.ConfigException: The configured main jar does not exist in the input directory /Users/sololo/Documents/Java/Java Projects/DesktopAppDemo/build/compose/tmp/packageDmg/libs/DesktopAppDemo-1.1.0-30a8f8b2a9a1d7678d1fbcccb1c9e1f.jar
    o
    • 2
    • 12
  • b

    Brian G

    05/25/2021, 1:26 PM
    How long is it going to take for me to remember that searching by class name is not going to show my
    @Composable
    functions 🤦‍♂️
    b
    o
    • 3
    • 6
  • a

    Arslan Armanuly

    05/25/2021, 3:29 PM
    @Sebastian Aigner we are waiting your blogpost
    👀 7
    s
    • 2
    • 1
  • d

    Dirk Hoffmann

    05/25/2021, 5:08 PM
    I realized that
    LocalAppWindow.current.height
    is the Dp height of the window (as Int) INCLUDING the OS window title, right? Is there a target OS independent way to decide the height of the window title? (or is it always 28.dp ?) I wanna determin the max "usable" height of the window, which seems to be LocalAppWindow height MINUS OS window title ...
    i
    b
    • 3
    • 2
  • d

    Dirk Hoffmann

    05/25/2021, 6:41 PM
    BTW I find it a bit "disturbing" that
    LocalAppWindow.current.(width|height)
    are of datatype
    Int
    but represent height|width in
    Dp
    ... so if you wanna have e.g. the window width in Float to compare it to a
    Size
    or
    Offset
    you have to do
    LocalAppWindow.current.width * LocalDensity.current.density
    Even more at the "root" of all Apps:
    fun main() = Window(title = "Compose for Desktop", size = IntSize(300, 300)) {
    The window doesn't have an IntSize of 300, 300 ... in fact it has a DpSize of 300, 300 and an
    IntSize(600, 600)
    (if density == 2.0f)
    👍 6
    k
    b
    +3
    • 6
    • 23
  • s

    Sololo

    05/26/2021, 3:33 AM
    how to make the TextField be selectable?
    d
    • 2
    • 3
  • d

    Daniele B

    05/26/2021, 9:37 AM
    So, is it possible to compile Compose Desktop only with IntellijIDEA and not with Android Studio?
    b
    i
    +2
    • 5
    • 7
  • d

    Dirk Hoffmann

    05/26/2021, 10:53 AM
    `BasicTextField`'s
    cursorBrush
    parameter defaults to
    SolidColor(Color.Black)
    I think it should default to some MaterialTheme value ... otherwise it is very hard to spot in darkModes 🙂 (btw is this chat the right place to report such things??)
    ✅ 1
    o
    a
    c
    • 4
    • 13
  • c

    Carter

    05/26/2021, 1:08 PM
    Are there any emerging conventions for localization in Compose Desktop (and also hopefully Web)?
    d
    • 2
    • 6
  • p

    PHondogo

    05/26/2021, 3:20 PM
    Hello! I have Surface with clickable handler a Text on it. In build-184 when i click on Text, click event propagated to surfsce click handler. In build-211 it is not propagated. What should i do, to keep previous logic?
    a
    m
    r
    • 4
    • 5
  • d

    Daniel

    05/26/2021, 4:19 PM
    How are people handling routing?
    t
    s
    • 3
    • 2
  • u

    uli

    05/26/2021, 8:49 PM
    Hi all, i am trying to avoid a 1.4.32 -> 1.5.0 kotlin update by building my multiplatform module with compose-desktop “0.4.0-build208”. For some reason I still get this error:
    > Task :shared:compileKotlinJvm
    e: This version (1.0.0-beta08) of the Compose Compiler requires Kotlin version 1.5.0 but you appear to be using Kotlin version 1.4.32 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
    Any hints where “1.0.0-beta08" could be coming from? And how to set the Compose Compiler version in non-android projects?
    j
    c
    +2
    • 5
    • 12
  • v

    Vadim Kapustin

    05/27/2021, 11:30 AM
    I tried to change in my project Kotlin 1.4.32 and Compose build190 to Kotlin 1.5.0 and Compose build210... When I rebuild my project I receive Internal compiler error (look in the thread). I tried other earlier builds including build198 with Kotlin 1.4.32 and had the same error. When I returned to build190, error disappeared. What should I do to upgrade to the newer builds?
    j
    t
    a
    • 4
    • 35
  • k

    kevin

    05/27/2021, 1:56 PM
    I want to display a large block of text (a very long line essentially) word wrapped on the screen. If I put the text into a Text component then there is no scrolling, if I use a BasicTextField I get scrolling but there doesn’t appear to be any scroll bars. Is there a way to fix either of these issues? Thanks
    j
    i
    • 3
    • 6
  • d

    Dirk Hoffmann

    05/27/2021, 2:56 PM
    I am trying to let Typography TextStyles (for body, h1, subtitle, ...) *color*s to depend on darkMode light Mode with switching while App is running. But on switching the TextStyle colors are not honoured ... what's the way to achieve this?
    Window {
            DesktopTheme {
                MyCustomDeskMaterialTheme {
                    MinRootContent()
                    ...
    @Composable
    fun MyCustomDeskMaterialTheme(content: @Composable () -> Unit) {
        MaterialTheme(
            colors = if (isDarkTheme()) DarkColorPalette() else LightColorPalette(),
            typography = if (isDarkTheme()) DarkTypography() else LightTypography()
        ) {
            ...
    
    fun DarkTypography() : Typography {
        val orig = Typography()
        return orig.copy(
                subtitle1 = orig.subtitle1.copy(color = DarkColorPalette().onBackground),
                subtitle2 = orig.subtitle2.copy(color = DarkColorPalette().onBackground),
                body1 = orig.body1.copy(color = DarkColorPalette().onSurface),
                body2 = orig.body2.copy(color = DarkColorPalette().onSurface))
    }
    
    fun LightTypography() : Typography {
        val orig = Typography()
        return orig.copy(
                subtitle1 = orig.subtitle1.copy(color = LightColorPalette().onBackground),
                subtitle2 = orig.subtitle2.copy(color = LightColorPalette().onBackground),
                body1 = orig.body1.copy(color = LightColorPalette().onSurface),
                body2 = orig.body2.copy(color = LightColorPalette().onSurface))
    }
    
    fun DarkColorPalette() = darkColors(
        primary = Solarized.Base1,
        ...
    when accessing it with e.g.
    MaterialTheme.typography.subtitle2
    font has always the color of the mode app started with
    z
    c
    l
    • 4
    • 20
  • c

    Ch8n

    05/27/2021, 6:55 PM
    Hi guys is there a way to apply bitmap on the shapes we draw on canvas API ?, example if i
    drawCircle(...)
    how can I put a bitmap image in it so it looks like a circular image view
    i
    r
    t
    • 4
    • 8
  • t

    Tlaster

    05/28/2021, 10:50 AM
    0.4.0-rc1 :kotlin-intensifies: https://github.com/JetBrains/compose-jb/releases/tag/v0.4.0-rc1
    🔥 7
    m
    j
    • 3
    • 2
  • j

    John O'Reilly

    05/28/2021, 4:50 PM
    I updated to
    0.4.0-rc2
    version (from
    0.4.0-build189
    ) and now seeing what looks like change in recomposition behaviour...more in thread...
    j
    • 2
    • 22
  • s

    spierce7

    05/29/2021, 5:43 AM
    Does anyone else have a problem when using java ui applications, the entire screen flickers during launch?
    :yes: 1
    m
    • 2
    • 10
  • r

    rsktash

    05/29/2021, 7:00 AM
    https://plugins.jetbrains.com/plugin/16541-compose-multiplatform-ide-support How can I use this plugin? I couldn’t find compose tooling for desktop
    👀 1
    o
    • 2
    • 1
  • j

    John O'Reilly

    05/29/2021, 12:43 PM
    If I understand correctly, the android related dependencies are also pulled in as part of Compose Desktop build? If so, what's general approach used then to only depend on those for both?
    j
    a
    u
    • 4
    • 20
  • s

    SrSouza

    05/29/2021, 2:22 PM
    https://twitter.com/shikasd_/status/1398445030419877891
    :kotlin-intensifies: 15
    b
    s
    s
    • 4
    • 4
  • s

    spierce7

    05/29/2021, 4:05 PM
    Has anyone seen this exception?
    java.lang.NoSuchMethodError: 'void androidx.compose.runtime.Composer.startReplaceableGroup(int, java.lang.String)'
    I’m using Kotlin 1.5.10 and compose desktop 0.4.0-rc2
    z
    • 2
    • 2
  • j

    jmfayard

    05/29/2021, 5:42 PM
    What sample app exists that are desktop only? I would rather start with something simple, letting the multiplatform stuff for later
    s
    t
    • 3
    • 6
  • s

    spierce7

    05/29/2021, 7:33 PM
    What’s the best way to center a label vertically in an
    OutlinedTextField
    . I can’t seem to find a good way.
    k
    d
    • 3
    • 5
  • s

    spierce7

    05/30/2021, 1:09 AM
    Is there a way to write compose tests in a multiplatform way?
    c
    • 2
    • 2
  • s

    spierce7

    05/30/2021, 5:20 AM
    Is there a way to control the color of menu bars at the top of windows on osx? I realize this isn’t specific to Desktop Compose, but all my attempts to do it through swing have failed. Has anyone figured it out?
    • 1
    • 1
  • x

    xxfast

    05/30/2021, 12:25 PM
    Hi all - is ui-tooling support for jetbrains compose is still a TODO?
    k
    j
    • 3
    • 3
Powered by Linen
Title
x

xxfast

05/30/2021, 12:25 PM
Hi all - is ui-tooling support for jetbrains compose is still a TODO?
k

Kirill Grouchnikov

05/30/2021, 12:32 PM
What kind of a support are you looking for? drag-and-drop palette of components? Preview functionality? Something else?
j

Javier

05/30/2021, 12:41 PM
https://kotlinlang.slack.com/archives/C01D6HTPATV/p1622271623219900?thread_ts=1622271623.219900&cid=C01D6HTPATV
x

xxfast

05/31/2021, 2:35 AM
Just the previews really - but thanks
View count: 2