Tunji Dahunsi
03/12/2026, 12:29 PMwindow.rootPane.apply {
rootPane.putClientProperty("apple.awt.fullWindowContent", true)
rootPane.putClientProperty("apple.awt.transparentTitleBar", true)
rootPane.putClientProperty("apple.awt.windowTitleVisible", false)
}
Is there a convenient way to update the logic for status bar inset calculation? LocalPlatformWindowInsets seemed promising, but it looks set to be removedAlexander Maryanovsky
03/12/2026, 1:02 PMPlatformWindowInsets are not relevant on the desktop.
Can you explain the problem? Itโs hard to understand just from the screenshot.Tunji Dahunsi
03/12/2026, 1:08 PMwindow.rootPane.apply {
rootPane.putClientProperty("apple.awt.fullWindowContent", true)
rootPane.putClientProperty("apple.awt.transparentTitleBar", true)
rootPane.putClientProperty("apple.awt.windowTitleVisible", false)
}
Upon making the title bar transparent, I now render underneath it, similar to going edge to edge on Android.
I thought, the WindowInset API would let me achieve on Desktop what I can achieve on Android.
I've attached screenshots of before and after to show what I'm going for.Alexander Maryanovsky
03/12/2026, 1:11 PMTunji Dahunsi
03/12/2026, 1:14 PMTunji Dahunsi
03/12/2026, 1:15 PMLocalPlatformWindowInsets level at the root of my hierarchy and let the rest of the composition tree consume them as normalTunji Dahunsi
03/12/2026, 1:19 PMWindowInsets and provide that to the Compose hierarchyืืืืื ืืืก
03/12/2026, 1:20 PMAlexander Maryanovsky
03/12/2026, 1:23 PMCompose for Desktop does not allow drawing custom content in the title bar while keeping native window controls and native behavior (drag, resize, double-click maximize). You must choose between a native title bar you cannot customize, or a fully undecorated window where you reimplement everything from scratch.Not sure thatโs strictly correct. Compose doesnโt, but Swing does.
Alexander Maryanovsky
03/12/2026, 1:23 PMืืืืื ืืืก
03/12/2026, 1:24 PMAlexander Maryanovsky
03/12/2026, 1:24 PMModifier.windowInsetsPadding(WindowInsets(top = 40.dp))Alexander Maryanovsky
03/12/2026, 1:25 PMAh yes, I didnโt know that, how do I do it?See the JRootPane client properties in the code above
ืืืืื ืืืก
03/12/2026, 1:26 PMAlexander Maryanovsky
03/12/2026, 1:29 PMCPlatformWindow.javaTunji Dahunsi
03/12/2026, 1:29 PMModifier.windowInsetsPadding(WindowInsets(top = 40.dp)) , but I'd need to do this differently per platform per call site.
This is why I was hoping to centralize it with LocalPlatformWindowInsets ; i.e not make any changes to the calling code, just provide a platform specific inset provider.
I may still be able to pull it off, I'm looking at the expect/actual impls here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[โฆ]in/androidx/compose/foundation/layout/WindowInsets.android.ktAlexander Maryanovsky
03/12/2026, 1:34 PMexpect val statusBarInsets: WindowInsets
and implement it on Android via
actual val WindowInsets.Companion.myStatusBarInsets: WindowInsets
get() = WindowInsets.statusBars
and on the desktop
actual val WindowInsets.Companion.myStatusBarInsets: WindowInsets
@Composable get() = WindowInsets(top = 40.dp)Tunji Dahunsi
03/12/2026, 1:35 PMseb
03/12/2026, 3:48 PMseb
03/12/2026, 3:49 PMืืืืื ืืืก
03/12/2026, 3:51 PMืืืืื ืืืก
03/12/2026, 4:31 PMseb
03/12/2026, 7:20 PMืืืืื ืืืก
03/12/2026, 7:22 PMืืืืื ืืืก
03/12/2026, 7:34 PMseb
03/12/2026, 7:40 PMseb
03/12/2026, 7:40 PMAlexander Maryanovsky
03/12/2026, 7:41 PMAlexander Maryanovsky
03/12/2026, 7:41 PMseb
03/12/2026, 7:42 PMืืืืื ืืืก
03/12/2026, 7:44 PMMaterial is an objectively poor choice as it is definitely a mobile-oriented implementation.Well, this might surprise you, but I donโt agree. I think Material Design can actually be a very good choice on desktop. However, I completely agree with @Alexander Maryanovsky that a serious application cannot have the same UI on desktop and mobile. If you look at apps like Google Chrome, Google Docs, or Gmail, they use Material and they look very nice. The real problem is when people use it the same way they would on Android.
ืืืืื ืืืก
03/12/2026, 7:45 PMAlexander Maryanovsky
03/12/2026, 7:45 PMืืืืื ืืืก
03/12/2026, 7:45 PMืืืืื ืืืก
03/12/2026, 7:48 PMAlexander Maryanovsky
03/12/2026, 7:50 PMseb
03/12/2026, 7:51 PMseb
03/12/2026, 7:52 PMseb
03/12/2026, 7:52 PMืืืืื ืืืก
03/12/2026, 7:53 PMThey DEFINITELY do not use the Compose or web libraries for components (modifiรฉ)Yes, I figured as much, I'm just saying that with a few tricks we can make something acceptable
seb
03/12/2026, 7:53 PMseb
03/12/2026, 7:53 PMืืืืื ืืืก
03/12/2026, 7:55 PMseb
03/12/2026, 7:56 PMseb
03/12/2026, 7:56 PMseb
03/12/2026, 7:57 PMseb
03/12/2026, 7:57 PMืืืืื ืืืก
03/12/2026, 7:58 PMseb
03/12/2026, 7:59 PMseb
03/12/2026, 7:59 PMseb
03/12/2026, 8:00 PMืืืืื ืืืก
03/12/2026, 8:00 PMืืืืื ืืืก
03/12/2026, 8:00 PMseb
03/12/2026, 8:01 PMืืืืื ืืืก
03/12/2026, 8:04 PMseb
03/12/2026, 8:05 PMseb
03/12/2026, 8:05 PMืืืืื ืืืก
03/12/2026, 8:08 PMseb
03/12/2026, 8:09 PMืืืืื ืืืก
03/12/2026, 8:11 PMChris Sinco [G]
03/13/2026, 2:22 AMChris Sinco [G]
03/13/2026, 2:23 AM