diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index 6d5986a..1713563 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -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() } } diff --git a/src/main/resources/assets/logo/logo.png b/src/main/resources/assets/logo/logo.png new file mode 100644 index 0000000..c74263b Binary files /dev/null and b/src/main/resources/assets/logo/logo.png differ