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 modify inner padding values that OutlinedTextFieldDecorationBox applies to the trailing icon?
I'm building a custom BasicTextField using OutlinedTextFieldDecorationBox that is intended to be a Numeric field with units of measurement after the input value. "100 ft" or "3.5 kg" etc.
Additionally, I want it to be relatively compact, so I…

Luoencz
- 21
- 3
0
votes
0 answers
Compose Desktop detect touchpad multi finger events
I want to detect Horizontal and Vertical multi finger events like scrolling.
I can detect vertical scroll events like this:
Modifier.onPointerEvent(PointerEventType.Scroll) {
println("onScroll: ${it.changes.first().scrollDelta}")
}
and this is…

MohammadBaqer
- 766
- 6
- 32
0
votes
1 answer
Component behaviour fine on Windows, but not on Linux
I'm implementing a chess clock in Jetpack Compose for Desktop.
But it seems I'm facing a strange behaviour : on Linux (at least on Ubuntu 22.04 64 bits), when you switch window so that the clock host is in background process, the clock is paused…

loloof64
- 5,252
- 12
- 41
- 78
0
votes
1 answer
Compose desktop can't detect horizontal scrolling
so i'm developing a desktop application using compose desktop and I need to detect horizontal scroll.
here is what I tried already:
.onPointerEvent(PointerEventType.Scroll) { println(it.changes.first().scrollDelta)}
the problem is i can only get…

MohammadBaqer
- 766
- 6
- 32
0
votes
0 answers
Simple image editing function with multible layers in Jetpack Compose Desktop
I chose to create a small program using Jetpack Compose for Desktop to solve my specific problem described here Image Processing with combined Batch- and manual mode
To realize this, i need UI components that allows me:
having multiple Images…

Tobias Wohlfarth
- 56
- 7
0
votes
0 answers
Kotlin Compose Desktop NavigationRailItem
How can I adjust the hover on NavigationRailItem?
I changed the item to 150dp width, but I did not found a way to adjust the hover effect, or change it to apply the color on the icon and label on hover.
It's too big for the item.
On the image the…

Javarian
- 127
- 2
- 13
0
votes
1 answer
How do I modify the child composables passed into a function in Jetpack Compose?
I'm new to both Kotlin and Jetpack Compose, and am trying to implement a custom composable which takes in a list of cells and a number of columns, and lays it out in a table format. Each cell in the table can hold any content. Essentially a grid of…

H0tCh0colat3
- 1
- 1
0
votes
2 answers
How to render(or convert) a composable to image in compose-desktop
As the title says, hot to render a composable to image.
I want to render a composable to image on my server and send it to client
I have try for these code, bat it does not work.
SwingUtilities.invokeLater {
val composePanel =…

luckcc00
- 11
- 3
0
votes
1 answer
Why are my vertical lines not lining up like the horizontal lines in Jetpack Compose for desktop?
I'm learning Kotlin and Jetpack Compose desktop. I've made a Sudoku solver and am now trying to make it graphical. My window dimensions are 800 X 800. I have 20.dp padding around all sides. My formula for placing the horizontal lines works perfect.…

JD74
- 257
- 1
- 8
0
votes
1 answer
How to make Compose component non-focusable?
I have a Composable Row that has some click listeners:
val action = { ... }
Row(Modifier.clickable(action) {
IconButton({ /* other, unrelated action */}) {}
Text("This isn't clickable")
Checkbox({ /* something that calls action() on toggle */…

Jorn
- 20,612
- 18
- 79
- 126
0
votes
0 answers
Why won't my checkbox UI update on the first click, but will update on every click after that?
I have a Jetpack Compose for Desktop UI application that shows a popup with a list of enums, each of which has a checkbox to toggle them:
Sorry for the long code, this is as small a MCVE as I could make of it.
enum class MyEnum {
A, B, C
}
data…

Jorn
- 20,612
- 18
- 79
- 126
0
votes
1 answer
How to exclude a clickable element from the tab order
With Jetpack Compose for Desktop, we can make pretty much any element clickable:
Text("I'm clickable", Modifier.clickable { onClick() })
This causes the element to be included in the tab order, and most of the time that's what you want. But in my…

Jorn
- 20,612
- 18
- 79
- 126
0
votes
0 answers
Where are proguard mappings stored in a Jetpack Compose Desktop app?
I am trying to use Sentry.IO to keep track of crashes for my Jetpack Compose Desktop application.
In order for it to work on product I need to upload to Sentry the mapping files from proguard. I cannot seem to find them in the project files…

Alex Styl
- 3,982
- 2
- 28
- 47
0
votes
0 answers
Small alert dialog screen shrinking the text
I'm using compose desktop 1.2.0 using Kotlin 1.7.20,
When I use alert dialog I get only a small alert dialog that shrinks the text inside.
I've tried that minimal code:
import androidx.compose.foundation.layout.Column
import…

IdanB
- 167
- 1
- 3
- 13
0
votes
1 answer
Compose Desktop preview with parameters
Is there any way to use Compose Desktop preview in Idea for functions that have parameters? It works for me with functions without parameters only. And it looks like neither @Preview annotation have any parameters nor there are @PreviewParameter…

Kiryl Tkach
- 3,118
- 5
- 20
- 36