Igor Demin
1 year ago
2 changed files with 28 additions and 26 deletions
@ -1,23 +1,7 @@ |
|||||||
package org.jetbrains.compose.demo.visuals |
package org.jetbrains.compose.demo.visuals |
||||||
|
|
||||||
import androidx.compose.runtime.Composable |
|
||||||
import androidx.compose.runtime.remember |
|
||||||
import androidx.compose.ui.unit.dp |
|
||||||
import androidx.compose.ui.window.* |
|
||||||
|
|
||||||
actual fun width(): Int = 640 |
actual fun width(): Int = 640 |
||||||
actual fun height(): Int = 480 |
actual fun height(): Int = 480 |
||||||
|
|
||||||
@Composable |
fun mainNY() = println(measureHappyNY()) |
||||||
fun NYWindow(onCloseRequest: () -> Unit) { |
|
||||||
val windowState = remember { WindowState(width = width.dp, height = height.dp) } |
|
||||||
Window(onCloseRequest = onCloseRequest, undecorated = false, transparent = false, state = windowState) { |
|
||||||
NYContent() |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
fun mainNY() = application { |
|
||||||
NYWindow(::exitApplication) |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue