mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
move Compose submodule and update mpp demo (#1678)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
This commit is contained in:
committed by
GitHub
parent
edd59c08f1
commit
a7ea7b7767
Submodule compose/frameworks/support updated: 50a8603587...fe220467ab
@@ -66,12 +66,8 @@ fun FallingBalls(game: Game) {
|
||||
.fillMaxHeight(1f)
|
||||
.onSizeChanged {
|
||||
with(density) {
|
||||
if (org.jetbrains.skiko.kotlinBackend == KotlinBackend.JVM) {
|
||||
// Really ugly hack, until we properly pass geometry.
|
||||
// TODO: fix me in Compose.
|
||||
game.width = it.width.toDp()
|
||||
game.height = it.height.toDp()
|
||||
}
|
||||
game.width = it.width.toDp()
|
||||
game.height = it.height.toDp()
|
||||
}
|
||||
}
|
||||
) {
|
||||
|
||||
@@ -15,11 +15,7 @@ object JsTime : Time {
|
||||
fun main() {
|
||||
onWasmReady {
|
||||
Window("Falling Balls") {
|
||||
val game = remember { Game(JsTime).apply {
|
||||
// Ugly hack, properly pass geometry.
|
||||
width = 800.dp
|
||||
height = 800.dp
|
||||
}}
|
||||
val game = remember { Game(JsTime) }
|
||||
FallingBalls(game)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,7 @@ object MacosTime : Time {
|
||||
fun main() {
|
||||
NSApplication.sharedApplication()
|
||||
Window("Falling Balls") {
|
||||
val game = remember { Game(MacosTime).apply {
|
||||
// TODO: rework, now we do not properly propagate geometry changes.
|
||||
width = 800.dp
|
||||
height = 600.dp
|
||||
} }
|
||||
val game = remember { Game(MacosTime) }
|
||||
FallingBalls(game)
|
||||
}
|
||||
NSApp?.run()
|
||||
|
||||
@@ -45,10 +45,7 @@ class SkikoAppDelegate : UIResponder, UIApplicationDelegateProtocol {
|
||||
override fun application(application: UIApplication, didFinishLaunchingWithOptions: Map<Any?, *>?): Boolean {
|
||||
window = UIWindow(frame = UIScreen.mainScreen.bounds)
|
||||
window!!.rootViewController = Application("Falling Balls") {
|
||||
val game = remember { Game(UikitTime).apply {
|
||||
width = 800.dp
|
||||
height = 800.dp
|
||||
} }
|
||||
val game = remember { Game(UikitTime) }
|
||||
Column {
|
||||
// To skip upper part of screen.
|
||||
Box(modifier = Modifier
|
||||
|
||||
Reference in New Issue
Block a user