Skip to content

Commit

Permalink
added desktop ui for the EntryScreen2Source.
Browse files Browse the repository at this point in the history
Signed-off-by: alwinsDen <[email protected]>
  • Loading branch information
alwinsDen committed Nov 5, 2024
1 parent 2064ed2 commit 2ef3898
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.input.pointer.PointerIcon
import androidx.compose.ui.input.pointer.pointerHoverIcon
import androidx.compose.ui.unit.dp
import com.composables.icons.lucide.Lucide
import com.composables.icons.lucide.Power
Expand Down Expand Up @@ -36,6 +38,7 @@ fun LogoutGoogle(iconColor: Long = 0xffffffff) {
nvvController.navigate(NavRouteClass.Home.route)
}
}
.pointerHoverIcon(PointerIcon.Hand)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,68 @@
package org.alwinsden.remnant

import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.jetbrains.compose.resources.painterResource
import remnant.composeapp.generated.resources.Res
import remnant.composeapp.generated.resources.TulipVertical

actual fun getPlatformName(): String {
return "desktop"
}

@Preview
@Composable
actual fun EntryScreen2Source() {
Text(text = "desktop expect function")
BoxWithConstraints(
modifier = Modifier
.fillMaxSize(),
) {
Text(
text = "Why worry?\n" +
"What’s sad in\n" +
"pastures of this\n" +
"World?",
textAlign = TextAlign.Center,
fontFamily = JudsonFontFamily,
fontSize = 35.sp,
modifier = Modifier
.align(Alignment.Center)
)
Text(
text = "next ->",
modifier = Modifier
.align(Alignment.Center)
.offset(y = 110.dp),
color = Color(0xFF000000),
fontFamily = InterFontFamily,
fontWeight = FontWeight.Medium,
fontSize = 15.sp
)
Column(
modifier = Modifier
.align(Alignment.BottomCenter)
) {
Image(
painter = painterResource(Res.drawable.TulipVertical),
contentDescription = null,
modifier =
Modifier
.aspectRatio(0.34065935f)
.offset(x = (-270).dp, y = 230.dp)
)
}

}
}

data class Progress(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package org.alwinsden.remnant

import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.WindowState
import androidx.compose.ui.window.application
import org.alwinsden.remnant.dataStore.ApplicationComponent

fun main() = application {
ApplicationComponent.init()
Window(
onCloseRequest = ::exitApplication,
title = "Remnant",
title = "Remnant Desktop",
resizable = false,
state = WindowState(width = 1128.dp, height = 705.dp)
) {
App()
}
Expand Down

0 comments on commit 2ef3898

Please sign in to comment.