feat(ui): use Google Sans Flex font in clock
This commit is contained in:
@@ -64,7 +64,7 @@ import androidx.core.view.WindowInsetsCompat
|
|||||||
import androidx.core.view.WindowInsetsControllerCompat
|
import androidx.core.view.WindowInsetsControllerCompat
|
||||||
import androidx.navigation3.ui.LocalNavAnimatedContentScope
|
import androidx.navigation3.ui.LocalNavAnimatedContentScope
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import org.nsh07.pomodoro.ui.theme.AppFonts.interClock
|
import org.nsh07.pomodoro.ui.theme.AppFonts.googleFlex600
|
||||||
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
||||||
import org.nsh07.pomodoro.ui.timerScreen.TimerScreen
|
import org.nsh07.pomodoro.ui.timerScreen.TimerScreen
|
||||||
import org.nsh07.pomodoro.ui.timerScreen.viewModel.TimerMode
|
import org.nsh07.pomodoro.ui.timerScreen.viewModel.TimerMode
|
||||||
@@ -248,7 +248,7 @@ fun SharedTransitionScope.AlwaysOnDisplay(
|
|||||||
Text(
|
Text(
|
||||||
text = timerState.timeStr,
|
text = timerState.timeStr,
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
fontFamily = interClock,
|
fontFamily = googleFlex600,
|
||||||
fontSize = 56.sp,
|
fontSize = 56.sp,
|
||||||
letterSpacing = (-2).sp,
|
letterSpacing = (-2).sp,
|
||||||
fontFeatureSettings = "tnum"
|
fontFeatureSettings = "tnum"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import androidx.compose.ui.text.input.KeyboardType
|
|||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import org.nsh07.pomodoro.ui.theme.AppFonts.interClock
|
import org.nsh07.pomodoro.ui.theme.AppFonts.googleFlex600
|
||||||
import org.nsh07.pomodoro.ui.theme.CustomColors.listItemColors
|
import org.nsh07.pomodoro.ui.theme.CustomColors.listItemColors
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||||
@@ -62,7 +62,7 @@ fun MinuteInputField(
|
|||||||
imeAction = imeAction
|
imeAction = imeAction
|
||||||
),
|
),
|
||||||
textStyle = TextStyle(
|
textStyle = TextStyle(
|
||||||
fontFamily = interClock,
|
fontFamily = googleFlex600,
|
||||||
fontSize = 57.sp,
|
fontSize = 57.sp,
|
||||||
letterSpacing = (-2).sp,
|
letterSpacing = (-2).sp,
|
||||||
color = if (enabled) colorScheme.onSurfaceVariant else colorScheme.outlineVariant,
|
color = if (enabled) colorScheme.onSurfaceVariant else colorScheme.outlineVariant,
|
||||||
|
|||||||
@@ -92,8 +92,6 @@ val Typography = Typography(
|
|||||||
|
|
||||||
@OptIn(ExperimentalTextApi::class)
|
@OptIn(ExperimentalTextApi::class)
|
||||||
object AppFonts {
|
object AppFonts {
|
||||||
val interClock = FontFamily(Font(R.font.inter_bold))
|
|
||||||
|
|
||||||
val googleFlex400 = FontFamily(Font(R.font.google_sans_flex_400))
|
val googleFlex400 = FontFamily(Font(R.font.google_sans_flex_400))
|
||||||
|
|
||||||
val googleFlex600 = FontFamily(Font(R.font.google_sans_flex_600))
|
val googleFlex600 = FontFamily(Font(R.font.google_sans_flex_600))
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import androidx.navigation3.ui.LocalNavAnimatedContentScope
|
import androidx.navigation3.ui.LocalNavAnimatedContentScope
|
||||||
import org.nsh07.pomodoro.R
|
import org.nsh07.pomodoro.R
|
||||||
import org.nsh07.pomodoro.ui.theme.AppFonts.interClock
|
import org.nsh07.pomodoro.ui.theme.AppFonts.googleFlex600
|
||||||
import org.nsh07.pomodoro.ui.theme.AppFonts.robotoFlexTopBar
|
import org.nsh07.pomodoro.ui.theme.AppFonts.robotoFlexTopBar
|
||||||
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
import org.nsh07.pomodoro.ui.theme.TomatoTheme
|
||||||
import org.nsh07.pomodoro.ui.timerScreen.viewModel.TimerAction
|
import org.nsh07.pomodoro.ui.timerScreen.viewModel.TimerAction
|
||||||
@@ -282,9 +282,9 @@ fun SharedTransitionScope.TimerScreen(
|
|||||||
Text(
|
Text(
|
||||||
text = timerState.timeStr,
|
text = timerState.timeStr,
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
fontFamily = interClock,
|
fontFamily = googleFlex600,
|
||||||
fontSize = 72.sp,
|
fontSize = 72.sp,
|
||||||
letterSpacing = (-2).sp,
|
letterSpacing = (-2.6).sp,
|
||||||
fontFeatureSettings = "tnum"
|
fontFeatureSettings = "tnum"
|
||||||
),
|
),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
@@ -307,7 +307,7 @@ fun SharedTransitionScope.TimerScreen(
|
|||||||
timerState.currentFocusCount,
|
timerState.currentFocusCount,
|
||||||
timerState.totalFocusCount
|
timerState.totalFocusCount
|
||||||
),
|
),
|
||||||
fontFamily = interClock,
|
fontFamily = googleFlex600,
|
||||||
style = typography.titleLarge,
|
style = typography.titleLarge,
|
||||||
color = colorScheme.outline
|
color = colorScheme.outline
|
||||||
)
|
)
|
||||||
@@ -497,7 +497,7 @@ fun SharedTransitionScope.TimerScreen(
|
|||||||
Text(
|
Text(
|
||||||
it,
|
it,
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
fontFamily = interClock,
|
fontFamily = googleFlex600,
|
||||||
fontSize = 22.sp,
|
fontSize = 22.sp,
|
||||||
lineHeight = 28.sp,
|
lineHeight = 28.sp,
|
||||||
color = if (timerState.nextTimerMode == TimerMode.FOCUS) colorScheme.primary else colorScheme.tertiary,
|
color = if (timerState.nextTimerMode == TimerMode.FOCUS) colorScheme.primary else colorScheme.tertiary,
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user