From 2a5011fb2228369eeece894f13896902bed52f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 28 Sep 2023 16:59:20 +0200 Subject: [PATCH] Use dimens for SleepTimer instead of hardcoded dp values --- .../com/simplemobiletools/flashlight/views/SleepTimer.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/views/SleepTimer.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/views/SleepTimer.kt index 5807d13..d8c2ed2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/views/SleepTimer.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/views/SleepTimer.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp @@ -40,8 +41,8 @@ internal fun SleepTimer( Text( modifier = Modifier .align(Alignment.CenterVertically) - .padding(12.dp, 0.dp), - text = stringResource(id = R.string.sleep_timer) + .padding(horizontal = dimensionResource(id = R.dimen.normal_margin)), + text = stringResource(id = R.string.sleep_timer), ) Text( modifier = Modifier.align(Alignment.CenterVertically), @@ -50,7 +51,7 @@ internal fun SleepTimer( IconButton( modifier = Modifier .align(Alignment.CenterVertically) - .padding(8.dp), + .padding(dimensionResource(id = R.dimen.medium_margin)), onClick = onCloseClick, ) { Icon(