Skip to content

Commit

Permalink
Replace hardcoded spaces by tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea committed Oct 24, 2024
1 parent 69556aa commit b6626f5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/src/main/java/com/orange/ouds/app/ui/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ import com.orange.ouds.app.R
import com.orange.ouds.app.ui.navigation.appNavGraph
import com.orange.ouds.app.ui.utilities.isDarkModeEnabled
import com.orange.ouds.core.theme.OudsTheme
import com.orange.ouds.core.theme.value
import com.orange.ouds.core.utilities.OudsPreview
import com.orange.ouds.foundation.extensions.orElse
import com.orange.ouds.foundation.utilities.UiModePreviews
import com.orange.ouds.theme.OudsThemeContract
import com.orange.ouds.theme.orange.ORANGE_THEME_NAME
import com.orange.ouds.theme.orange.OrangeTheme
import com.orange.ouds.theme.orangecountry.OrangeCountryTheme
import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken
import com.orange.ouds.theme.whitelabel.WhiteLabelTheme

@Composable
Expand Down Expand Up @@ -155,12 +157,11 @@ private fun ChangeThemeDialog(themeManager: ThemeManager, dismissDialog: () -> U
.background(OudsTheme.colorScheme.surfaceVariant)
.selectableGroup()
) {
//TODO Replace hard coded values by tokens when available and use OUDS typography
Text(
text = stringResource(R.string.app_themeDialog_label),
modifier = Modifier
.padding(top = 16.dp, bottom = 8.dp)
.padding(horizontal = 16.dp),
.padding(top = OudsSpaceFixedKeyToken.Medium.value, bottom = OudsSpaceFixedKeyToken.Short.value)
.padding(horizontal = OudsSpaceFixedKeyToken.Medium.value),
style = MaterialTheme.typography.titleLarge
)
themeManager.availableThemes.forEach { theme ->
Expand All @@ -180,7 +181,7 @@ private fun ChangeThemeDialog(themeManager: ThemeManager, dismissDialog: () -> U
},
role = Role.RadioButton
)
.padding(horizontal = 16.dp),
.padding(horizontal = OudsSpaceFixedKeyToken.Medium.value),
verticalAlignment = Alignment.CenterVertically
) {
RadioButton(
Expand All @@ -190,7 +191,7 @@ private fun ChangeThemeDialog(themeManager: ThemeManager, dismissDialog: () -> U
Text(
text = theme.name,
style = MaterialTheme.typography.bodyLarge,
modifier = Modifier.padding(start = 16.dp)
modifier = Modifier.padding(start = OudsSpaceFixedKeyToken.Medium.value)
)
}
}
Expand Down

0 comments on commit b6626f5

Please sign in to comment.