From 224796433f5900433dd4c2e45cd118d4990c5e8d Mon Sep 17 00:00:00 2001 From: Yiqun Zhang Date: Sat, 15 Jun 2024 18:25:06 +0800 Subject: [PATCH] :bug: Aligning the application icon with the title --- .../kotlin/com/clipevery/ui/HomeView.kt | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/clipevery/ui/HomeView.kt b/composeApp/src/commonMain/kotlin/com/clipevery/ui/HomeView.kt index a8bcbc9fc..cf2147c3a 100644 --- a/composeApp/src/commonMain/kotlin/com/clipevery/ui/HomeView.kt +++ b/composeApp/src/commonMain/kotlin/com/clipevery/ui/HomeView.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width @@ -114,7 +115,7 @@ fun TitleView() { ) { Image( modifier = - Modifier.padding(13.dp, 13.dp, 13.dp, 13.dp) + Modifier.padding(start = 13.dp, top = 13.dp, end = 10.dp, bottom = 13.dp) .align(Alignment.CenterVertically) .clip(RoundedCornerShape(3.dp)) .size(36.dp), @@ -122,23 +123,31 @@ fun TitleView() { contentDescription = "clipevery icon", ) Column( - Modifier.wrapContentWidth(), + Modifier.wrapContentWidth() + .height(36.dp), horizontalAlignment = Alignment.CenterHorizontally, ) { Text( modifier = Modifier.align(Alignment.Start), text = "Compile Future", color = Color.White, - style = TextStyle(fontWeight = FontWeight.Light), - fontSize = 11.sp, + fontSize = 10.sp, + style = + TextStyle( + fontFamily = FontFamily.SansSerif, + fontWeight = FontWeight.Light, + ), ) Text( modifier = Modifier.align(Alignment.Start), text = "Clipevery", color = Color.White, fontSize = 25.sp, - style = TextStyle(fontWeight = FontWeight.Bold), - fontFamily = customFontFamily, + style = + TextStyle( + fontFamily = customFontFamily, + fontWeight = FontWeight.Bold, + ), ) } }