mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Fixed some typos in the launch screen and moved to .svg
This commit is contained in:
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 185 KiB |
@@ -12,15 +12,12 @@ import androidx.compose.runtime.*
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.graphics.toComposeImageBitmap
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.DpSize
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.window.*
|
import androidx.compose.ui.window.*
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import processing.app.Base
|
import processing.app.Base
|
||||||
import processing.app.Platform
|
|
||||||
import javax.imageio.ImageIO
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a splash screen window. A rewrite of Splash.java
|
* Show a splash screen window. A rewrite of Splash.java
|
||||||
@@ -29,8 +26,6 @@ class Start {
|
|||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
val splash = Platform.getContentFile("lib/about-processing.png")
|
|
||||||
val image = ImageIO.read(splash).toComposeImageBitmap()
|
|
||||||
val duration = 200
|
val duration = 200
|
||||||
val timeMargin = 50
|
val timeMargin = 50
|
||||||
|
|
||||||
@@ -44,7 +39,8 @@ class Start {
|
|||||||
resizable = false,
|
resizable = false,
|
||||||
state = rememberWindowState(
|
state = rememberWindowState(
|
||||||
position = WindowPosition(Alignment.Center),
|
position = WindowPosition(Alignment.Center),
|
||||||
size = DpSize(image.width.dp / 2 , image.height.dp / 2)
|
width = 578.dp,
|
||||||
|
height = 665.dp
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
var visible by remember { mutableStateOf(false) }
|
var visible by remember { mutableStateOf(false) }
|
||||||
@@ -81,7 +77,7 @@ class Start {
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
bitmap = image,
|
painter = painterResource("about-processing.svg"),
|
||||||
contentDescription = "About",
|
contentDescription = "About",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 710 KiB |
Reference in New Issue
Block a user