Compose for Desktop is modern toolkit for building native declarative UI made by JetBrains. It's based on Google's Jetpack Compose
Questions tagged [compose-desktop]
147 questions
0
votes
0 answers
How to write Instrumented Tests for Jetbrains Compose Multiplatform Windows App
I have an app built with Jetbrains Compose Multiplatform
I develop it on MacOS, but I generate an .msi installer which runs the App on Windows machine.
Is there any way to write automated UI tests / Instrumented Tests, which can run both on Windows…

SVK
- 676
- 1
- 5
- 17
0
votes
1 answer
Can I access Material Icons by name?
I'd like to make icons configurable. Is it possible to access the Material Icon library by name, rather than as extension properties on untyped objects? For example, something like this:
val icon = getMaterialIcon("Filled.Crop169") // would resolve…

Jorn
- 20,612
- 18
- 79
- 126
0
votes
0 answers
How to use Material 3 Theme and Components in Compose Desktop?
I want to use material 3 theme and components in a compose desktop project. I want to achieve the same as the default Empty Activity in an android studio project, where the theme, color scheme, and other components are using material 3 style by…

sayang_android
- 47
- 1
- 1
- 6
0
votes
1 answer
How to configure build variants in Compose Multiplatform
I have an app built with Jetbrains Compose Multiplatform
I need to generate two builds, i.e. .msi(Microsoft Software Installer) file.
One for internal use and one for external.
Example: AppInternal.msi and AppExternal.msi
Because I have some…

SVK
- 676
- 1
- 5
- 17
0
votes
0 answers
Implementation of Work Manager-like work scheduling for Kotlin Multiplatform
how can I implement workmanager like work scheduling in multiplaform
the intent is to develop offline first desktop app with compose desktop
the logic would be done implemented (i tried store 5 and it just didn't seem to cut it for me) and periodic…

ayitinya
- 63
- 1
- 10
0
votes
0 answers
How to play an MP3 file stored in resources folder in Kotlin Multiplatform with Jetpack Compose for Desktop?
I'm trying to play a sound in my Compose for Desktop project when pressing a button. My MP3 file is stored in the resources folder (./src/jvmMain/resources/beep.mp3).
I've been trying using the useResource function as follows (inside onClick…

Pion Developer
- 97
- 9
0
votes
1 answer
How to prevent copy/paste/cut context menu when right click on textfield [Jetpack Compose desktop]?
Reference solution
i'm developing a compose desktop application.how to do same thing in this platform.i mean prevent copy/paste/cut context menu when right click on desktop.
i try to provide EmptyTextToolbar to LocalTextToolbar.it's doesn't work.

LittleLee
- 1
- 2
0
votes
0 answers
sqldelight database setup for Compose Desktop, generated code is in wrong package
So I'm trying to set up sqldelight for my Compose Desktop project I created using IntelliJ's wizard.
The generated project has its source code in ./src/JvmMain. As it is a Desktop only project, there is no expected/actual setup with…

michpohl
- 852
- 8
- 30
0
votes
0 answers
What is "too large" for a SkSL shader, and how can I use larger shaders?
I can get Compose to render a fragment shader:
fun main() = singleWindowApplication(title = "Shaaaderrrs") {
val runtimeEffect = remember {
RuntimeEffect.makeForShader(
"""
uniform vec3 iResolution;
…

Hakanai
- 12,010
- 10
- 62
- 132
0
votes
1 answer
How to test Compose Multiplatform for Desktop interactively (i.e., not headless)
Is there a way to run tests with androidx.compose.ui.test interactively (i.e., so that I can see them running with my own eyes)? I’m having trouble with something and it would help to be able to see the UI as the test is trying to execute.
I tried…

Marc Fearby
- 1,305
- 1
- 13
- 28
0
votes
2 answers
Can't find Compose Desktop Preview tab in Intellij Idea
I can't find preview tab in my editor for Compose Desktop!
how can I enable this feature?

MohammadBaqer
- 766
- 6
- 32
0
votes
1 answer
Kotlin Multiplatform testing commonTest @Composable UI
I'm attempting a Kotlin Compose Multiplatform project and want to write a unit test for a piece of @Composable UI in my commonMain project. From the references I've found online, I should be able to do the following:
@get:Rule
val compose =…

Jesser
- 76
- 7
0
votes
0 answers
How to apply dagger 2 to compose desktop project
I have created a new Compose Multiplatform project with IJ Idea (single desktop platform).
Trying to add dagger to build.gradle.kts template:
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("multiplatform")
…

mihalis
- 33
- 6
0
votes
0 answers
Compose multiplatform drag&drop to copy item to another list
I have list filled with users, and i want to somehow copy specific user to another list by dragging him in it.
I'v founded several examples about reordering lists, but it seems to me it's not that i'm loocking for
If needed i can post my code here,…

anakiK1to
- 1
- 1
0
votes
0 answers
How to use Composables from common in Compose Web?
I made a simple Compose Web project using the getting started guide. It works when just using the Web API, so Composables like Div and Span.
However, the whole point of multiplatform is being able to reuse components, so I added common and jvm…

Jorn
- 20,612
- 18
- 79
- 126