11package features.about
22
33import androidx.compose.foundation.Image
4+ import androidx.compose.foundation.background
5+ import androidx.compose.foundation.layout.Box
46import androidx.compose.foundation.layout.Column
57import androidx.compose.foundation.layout.Spacer
8+ import androidx.compose.foundation.layout.fillMaxSize
69import androidx.compose.foundation.layout.fillMaxWidth
710import androidx.compose.foundation.layout.height
811import androidx.compose.foundation.layout.padding
912import androidx.compose.foundation.layout.size
13+ import androidx.compose.foundation.shape.RoundedCornerShape
1014import androidx.compose.runtime.Composable
1115import androidx.compose.ui.Alignment
1216import androidx.compose.ui.Modifier
17+ import androidx.compose.ui.draw.clip
18+ import androidx.compose.ui.draw.scale
19+ import androidx.compose.ui.layout.ContentScale
1320import androidx.compose.ui.platform.LocalUriHandler
21+ import androidx.compose.ui.res.colorResource
1422import androidx.compose.ui.unit.dp
1523import app.R
1624import app.ProjectInfo
@@ -25,6 +33,7 @@ import top.yukonga.miuix.kmp.theme.MiuixTheme
2533
2634private const val ProjectSourceUri = " https://github.com/Asterisk4Magisk/AsteriskNG"
2735private const val TelegramChannelUri = " https://t.me/AsteriskFactory"
36+ private const val AboutIconForegroundScale = 1.25f
2837
2938@Composable
3039internal fun AboutHeader (
@@ -37,11 +46,7 @@ internal fun AboutHeader(
3746 .padding(top = 20 .dp, bottom = 12 .dp),
3847 horizontalAlignment = Alignment .CenterHorizontally ,
3948 ) {
40- Image (
41- painter = painterResource(R .mipmap.ic_launcher),
42- contentDescription = ProjectInfo .PROJECT_NAME ,
43- modifier = Modifier .size(88 .dp),
44- )
49+ AboutAppIcon ()
4550 Spacer (Modifier .height(12 .dp))
4651 Text (
4752 text = ProjectInfo .PROJECT_NAME ,
@@ -55,6 +60,28 @@ internal fun AboutHeader(
5560 }
5661}
5762
63+ @Composable
64+ private fun AboutAppIcon (
65+ modifier : Modifier = Modifier ,
66+ ) {
67+ Box (
68+ modifier = modifier
69+ .size(88 .dp)
70+ .clip(RoundedCornerShape (22 .dp))
71+ .background(colorResource(R .color.ic_launcher_background)),
72+ contentAlignment = Alignment .Center ,
73+ ) {
74+ Image (
75+ painter = painterResource(R .mipmap.ic_launcher_foreground),
76+ contentDescription = ProjectInfo .PROJECT_NAME ,
77+ contentScale = ContentScale .Fit ,
78+ modifier = Modifier
79+ .fillMaxSize()
80+ .scale(AboutIconForegroundScale ),
81+ )
82+ }
83+ }
84+
5885@Composable
5986internal fun AboutRuntimeCard (
6087 modifier : Modifier = Modifier ,
0 commit comments