Skip to content

Commit

Permalink
Update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
muhxdan committed Dec 25, 2023
1 parent 14c9aa6 commit 13040c6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fun ImageNetworkLoader(
imageUrl: String,
voteAverage: Float,
modifier: Modifier = Modifier,
showVoteAverage: Boolean = true,
) {
Box {
SubcomposeAsyncImage(
Expand Down Expand Up @@ -74,8 +75,10 @@ fun ImageNetworkLoader(
}
}

Box(modifier = Modifier.padding(10.dp)) {
CircularVote(percentage = voteAverage)
if (showVoteAverage) {
Box(modifier = Modifier.padding(10.dp)) {
CircularVote(percentage = voteAverage)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.salt.apps.moov.ui.components.popular
package com.salt.apps.moov.ui.components

import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
Expand All @@ -25,14 +25,13 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import com.salt.apps.moov.data.model.Moov
import com.salt.apps.moov.ui.components.ImageNetworkLoader
import com.salt.apps.moov.data.model.Movie
import com.salt.apps.moov.ui.navigation.MoovScreen.DETAIL

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun PopularListItem(
movie: Moov,
fun MovieListItem(
movie: Movie,
navController: NavController
) {
Column {
Expand Down Expand Up @@ -69,8 +68,6 @@ fun PopularListItem(
.width(130.dp)
.height(150.dp)
)


}
Column(
modifier = Modifier
Expand Down
24 changes: 18 additions & 6 deletions app/src/main/java/com/salt/apps/moov/ui/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,53 @@ package com.salt.apps.moov.ui.theme

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import com.salt.apps.moov.R

val Hanken = FontFamily(
Font(R.font.hanken_grotesk_regular, FontWeight.Normal),
Font(R.font.hanken_grotesk_light, FontWeight.Light),
Font(R.font.hanken_grotesk_medium, FontWeight.Medium),
Font(R.font.hanken_grotesk_bold, FontWeight.Bold),
Font(R.font.hanken_grotesk_semibold, FontWeight.SemiBold),
Font(R.font.hanken_grotesk_extrabold, FontWeight.ExtraBold),
)


val Typography = Typography(
bodySmall = TextStyle(
fontFamily = FontFamily.Default,
fontFamily = Hanken,
fontWeight = FontWeight.Normal,
fontSize = 12.sp,
),
bodyMedium = TextStyle(
fontFamily = FontFamily.Default,
fontFamily = Hanken,
fontWeight = FontWeight.Normal,
fontSize = 17.sp,
),
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontFamily = Hanken,
fontWeight = FontWeight.Normal,
fontSize = 19.sp,
),

titleSmall = TextStyle(
fontFamily = FontFamily.Default,
fontFamily = Hanken,
fontWeight = FontWeight.Medium,
fontSize = 14.sp,
),

titleMedium = TextStyle(
fontFamily = FontFamily.Default,
fontFamily = Hanken,
fontWeight = FontWeight.Medium,
fontSize = 17.sp,
),

titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontFamily = Hanken,
fontWeight = FontWeight.Medium,
fontSize = 19.sp,
),
Expand Down

0 comments on commit 13040c6

Please sign in to comment.