Skip to content

Commit 8fb9ef5

Browse files
committed
Fixed some typos in the launch screen and moved to .svg
1 parent 05d89d7 commit 8fb9ef5

File tree

3 files changed

+78
-8
lines changed

3 files changed

+78
-8
lines changed

app/src/main/resources/about-processing.svg

+74
Loading

app/src/processing/app/ui/Start.kt

+4-8
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@ import androidx.compose.runtime.*
1212
import androidx.compose.ui.Alignment
1313
import androidx.compose.ui.Modifier
1414
import androidx.compose.ui.draw.clip
15-
import androidx.compose.ui.graphics.toComposeImageBitmap
16-
import androidx.compose.ui.unit.DpSize
15+
import androidx.compose.ui.res.painterResource
1716
import androidx.compose.ui.unit.dp
1817
import androidx.compose.ui.window.*
1918
import kotlinx.coroutines.delay
2019
import kotlinx.coroutines.launch
2120
import processing.app.Base
22-
import processing.app.Platform
23-
import javax.imageio.ImageIO
2421

2522
/**
2623
* Show a splash screen window. A rewrite of Splash.java
@@ -29,8 +26,6 @@ class Start {
2926
companion object {
3027
@JvmStatic
3128
fun main(args: Array<String>) {
32-
val splash = Platform.getContentFile("lib/about-processing.png")
33-
val image = ImageIO.read(splash).toComposeImageBitmap()
3429
val duration = 200
3530
val timeMargin = 50
3631

@@ -44,7 +39,8 @@ class Start {
4439
resizable = false,
4540
state = rememberWindowState(
4641
position = WindowPosition(Alignment.Center),
47-
size = DpSize(image.width.dp / 2 , image.height.dp / 2)
42+
width = 578.dp,
43+
height = 665.dp
4844
)
4945
) {
5046
var visible by remember { mutableStateOf(false) }
@@ -81,7 +77,7 @@ class Start {
8177
)
8278
) {
8379
Image(
84-
bitmap = image,
80+
painter = painterResource("about-processing.svg"),
8581
contentDescription = "About",
8682
modifier = Modifier
8783
.fillMaxSize()

build/shared/lib/about-processing.png

-710 KB
Binary file not shown.

0 commit comments

Comments
 (0)