Added logo, title and placement to the window
parent
45f9385bc8
commit
93cce95884
|
@ -1,9 +1,8 @@
|
|||
import androidx.compose.desktop.ui.tooling.preview.Preview
|
||||
import androidx.compose.foundation.hoverable
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.ui.Alignment
|
||||
|
@ -14,13 +13,31 @@ import androidx.compose.material.icons.filled.Check
|
|||
import androidx.compose.material.icons.filled.Close
|
||||
import java.awt.FileDialog
|
||||
import java.awt.Frame
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.lightColors
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.input.pointer.pointerMoveFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.window.*
|
||||
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
@Composable
|
||||
fun HomePage(
|
||||
onGlossaireClick: () -> Unit,
|
||||
onCodeAVerifierClick: () -> Unit
|
||||
) {
|
||||
var isHover by remember { mutableStateOf(false) }
|
||||
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
|
@ -34,7 +51,9 @@ fun HomePage(
|
|||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp)
|
||||
) {
|
||||
Button(onClick = onGlossaireClick) {
|
||||
Button(
|
||||
onClick = onGlossaireClick
|
||||
) {
|
||||
Text("Glossaire")
|
||||
}
|
||||
|
||||
|
@ -334,7 +353,21 @@ fun FormulairePage(onAnnulerClick: () -> Unit) {
|
|||
}
|
||||
|
||||
fun main() = application {
|
||||
Window(onCloseRequest = ::exitApplication) {
|
||||
val state = rememberWindowState(
|
||||
placement = WindowPlacement.Floating,
|
||||
position = WindowPosition(Alignment.Center),
|
||||
isMinimized = false,
|
||||
width = 800.dp,
|
||||
height = 600.dp
|
||||
)
|
||||
|
||||
Window(
|
||||
title = "Quali'Nomme",
|
||||
resizable = true,
|
||||
state = state,
|
||||
icon = painterResource("assets/logo/logo.png"),
|
||||
onCloseRequest = ::exitApplication
|
||||
) {
|
||||
App()
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
Loading…
Reference in New Issue