Welcome to Beta screen: SVG Logo

This commit is contained in:
Stef Tervelde
2025-02-06 13:09:39 +01:00
parent 4714a8b83b
commit 5ce873d21b
2 changed files with 31 additions and 21 deletions
+5
View File
@@ -0,0 +1,5 @@
<svg width="800" height="800" viewBox="0 0 800 800" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M400 500C700 500 700 100 400 100" stroke="#0468FF" stroke-width="150"/>
<path d="M400 200L100 600" stroke="#1F34AB" stroke-width="150"/>
<path d="M100 300L200 500" stroke="#85AEFF" stroke-width="150"/>
</svg>

After

Width:  |  Height:  |  Size: 329 B

+26 -21
View File
@@ -1,18 +1,16 @@
package processing.app.ui
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.awt.ComposePanel
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
@@ -21,6 +19,7 @@ import androidx.compose.ui.window.Window
import androidx.compose.ui.window.WindowPosition
import androidx.compose.ui.window.application
import androidx.compose.ui.window.rememberWindowState
import java.awt.Dimension
import javax.swing.JFrame
import javax.swing.SwingUtilities
@@ -28,7 +27,7 @@ import javax.swing.SwingUtilities
class WelcomeToBeta {
companion object{
val windowSize = Pair(400, 200)
val windowSize = Dimension(400, 200)
val windowTitle = "Welcome to Beta"
val title = "Welcome to the Processing Beta"
val message = """Thank you for trying out the new version of Processing. Were very grateful!
@@ -46,8 +45,8 @@ Please report any bugs on the forums."""
setContent {
welcomeToBeta()
}
size = windowSize
})
// setSize(windowSize.first, windowSize.second)
setLocationRelativeTo(null)
isVisible = true
}
@@ -61,22 +60,30 @@ Please report any bugs on the forums."""
Row(
modifier = Modifier
.padding(20.dp, 10.dp)
.size(windowSize.first.dp, windowSize.second.dp),
.size(windowSize.width.dp, windowSize.height.dp),
horizontalArrangement = Arrangement.spacedBy(20.dp)
)
{
// TODO: Add the Processing logo svg here
Box(modifier = Modifier
.align(Alignment.CenterVertically)
.size(100.dp, 100.dp)
.background(Color.Blue)
){
Image(
painter = painterResource("logo.svg"),
contentDescription = "Processing Logo",
modifier = Modifier
.align(Alignment.CenterVertically)
.size(100.dp, 100.dp)
)
Column(modifier = Modifier
.fillMaxHeight(),
Column(
modifier = Modifier
.fillMaxHeight(),
verticalArrangement = Arrangement.spacedBy(20.dp, alignment = Alignment.CenterVertically)
) {
Text(title, fontSize = 17.sp, fontWeight = FontWeight.SemiBold)
Text(message, fontSize = 13.sp)
Text(
title,
fontSize = 17.sp,
fontWeight = FontWeight.SemiBold
)
Text(
message,
fontSize = 13.sp
)
Row {
Spacer(modifier = Modifier.weight(1f))
// TODO Add button shadow and make interactive
@@ -84,9 +91,7 @@ Please report any bugs on the forums."""
modifier = Modifier
.background(Color.Blue)
.padding(10.dp)
.sizeIn(minWidth = 100.dp)
,
.sizeIn(minWidth = 100.dp),
contentAlignment = Alignment.Center
) {
Text(buttonText, color = Color.White)