mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 02:29:55 +02:00
Build native UI shell foundation
This commit is contained in:
@@ -3,11 +3,21 @@ package com.vnidrop.app
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
|
||||
fun main() = application {
|
||||
Window(
|
||||
onCloseRequest = ::exitApplication,
|
||||
title = "vnidrop",
|
||||
) {
|
||||
App()
|
||||
fun main() {
|
||||
configureMacOsNativeAppearance()
|
||||
application {
|
||||
Window(
|
||||
onCloseRequest = ::exitApplication,
|
||||
title = "vnidrop",
|
||||
) {
|
||||
App()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureMacOsNativeAppearance() {
|
||||
if (!System.getProperty("os.name").startsWith("Mac", ignoreCase = true)) return
|
||||
// AWT reads this before creating the first native window. Runtime theme
|
||||
// changes are handled in the JVM platform appearance hook.
|
||||
System.setProperty("apple.awt.application.appearance", "system")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user