Skip to content

Commit f8af86c

Browse files
committed
Fixed spacing for news component
1 parent b4a9017 commit f8af86c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

  • PennMobile/src/main/java/com/pennapps/labs/pennmobile/home/classes

PennMobile/src/main/java/com/pennapps/labs/pennmobile/home/classes/NewsCompose.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ import androidx.compose.foundation.layout.Column
1010
import androidx.compose.foundation.layout.Row
1111
import androidx.compose.foundation.layout.Spacer
1212
import androidx.compose.foundation.layout.aspectRatio
13+
import androidx.compose.foundation.layout.fillMaxHeight
1314
import androidx.compose.foundation.layout.fillMaxSize
1415
import androidx.compose.foundation.layout.fillMaxWidth
16+
import androidx.compose.foundation.layout.height
1517
import androidx.compose.foundation.layout.padding
1618
import androidx.compose.foundation.shape.RoundedCornerShape
1719
import androidx.compose.material3.Button
@@ -26,6 +28,7 @@ import androidx.compose.ui.layout.ContentScale
2628
import androidx.compose.ui.platform.LocalUriHandler
2729
import androidx.compose.ui.text.font.FontWeight
2830
import androidx.compose.ui.unit.dp
31+
import androidx.compose.ui.unit.em
2932
import androidx.compose.ui.unit.sp
3033
import coil.compose.rememberAsyncImagePainter
3134

@@ -62,7 +65,8 @@ fun NewsComposableComponent(
6265
modifier =
6366
Modifier
6467
.matchParentSize()
65-
.fillMaxWidth(),
68+
.fillMaxWidth()
69+
.fillMaxHeight(),
6670
)
6771
}
6872
Box(
@@ -91,7 +95,7 @@ fun NewsComposableComponent(
9195
modifier =
9296
Modifier
9397
.fillMaxWidth()
94-
.padding(12.dp),
98+
.padding(16.dp),
9599
) {
96100
Column(
97101
verticalArrangement = Arrangement.spacedBy(6.dp),
@@ -118,14 +122,15 @@ fun NewsComposableComponent(
118122
text = title,
119123
color = Color.White,
120124
fontWeight = FontWeight.Bold,
121-
fontSize = 18.sp,
125+
fontSize = 16.sp,
126+
lineHeight = 1.25.em,
122127
)
123128

124129
var description = "sample description here"
125130
article.subtitle?.let {
126131
description = article.subtitle
127132
}
128-
Text(text = description, color = Color.White)
133+
Text(text = description, color = Color.White, lineHeight = 1.15.em)
129134
}
130135
}
131136
}

0 commit comments

Comments
 (0)