@@ -25,6 +25,7 @@ import androidx.compose.ui.Modifier
2525import androidx.compose.ui.draw.clip
2626import androidx.compose.ui.graphics.vector.ImageVector
2727import androidx.compose.ui.res.stringResource
28+ import androidx.compose.ui.text.font.FontWeight
2829import androidx.compose.ui.unit.dp
2930import app.revanced.manager.R
3031
@@ -57,7 +58,7 @@ fun NotificationCard(
5758 modifier = Modifier
5859 .fillMaxWidth()
5960 .padding(16 .dp),
60- verticalAlignment = Alignment .Top ,
61+ verticalAlignment = if (actions != null ) Alignment .Top else Alignment . CenterVertically ,
6162 horizontalArrangement = Arrangement .spacedBy(16 .dp),
6263 ) {
6364 Box (
@@ -74,18 +75,21 @@ fun NotificationCard(
7475 modifier = Modifier .weight(1f ),
7576 verticalArrangement = Arrangement .spacedBy(8 .dp)
7677 ) {
77- title?.let {
78+ Column {
79+ title?.let {
80+ Text (
81+ text = it,
82+ style = MaterialTheme .typography.bodyMediumEmphasized.merge(fontWeight = FontWeight .SemiBold ),
83+ color = LocalContentColor .current,
84+ )
85+ }
7886 Text (
79- text = it ,
80- style = MaterialTheme .typography.bodyLarge ,
87+ text = text ,
88+ style = MaterialTheme .typography.bodyMedium ,
8189 color = LocalContentColor .current,
8290 )
8391 }
84- Text (
85- text = text,
86- style = MaterialTheme .typography.bodyLarge,
87- color = LocalContentColor .current,
88- )
92+
8993 actions?.let {
9094 Row (
9195 modifier = Modifier .fillMaxWidth(),
@@ -95,11 +99,14 @@ fun NotificationCard(
9599 }
96100 }
97101 if (onDismiss != null ) {
102+ // @TODO: Use xsmall icon buttons when that is available in Compose
98103 TooltipIconButton (
104+ modifier = Modifier .size(32 .dp),
99105 onClick = onDismiss,
100106 tooltip = stringResource(R .string.close),
101107 ) {
102108 Icon (
109+ modifier = Modifier .size(20 .dp),
103110 imageVector = Icons .Outlined .Close ,
104111 contentDescription = stringResource(R .string.close),
105112 )
0 commit comments