refactor: add dynamic font scaling support and integrate ProvideDynamicTypeFontScale across modules
This commit is contained in:
1 parent
df38936893
commit
abeb484258
12 files changed
+172
-30
No files matched your search
@@ -13,6 +13,9 @@ kotlin {
|
||||
implementation(libs.compose.uiToolingPreview)
|
||||
}
|
||||
commonMain.dependencies {
|
||||
// Core modules
|
||||
implementation(projects.core.accessibility)
|
||||
|
||||
// Data modules
|
||||
implementation(projects.data.preferences)
|
||||
implementation(projects.data.resources)
|
||||
|
||||
+16
-13
@@ -33,6 +33,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import bzh.ajaury.chombev.core.accessibility.ui.ProvideDynamicTypeFontScale
|
||||
import bzh.ajaury.chombev.onboarding.model.OnboardingLevel
|
||||
import bzh.ajaury.chombev.onboarding.ui.components.OnboardingInfoPage
|
||||
import bzh.ajaury.chombev.onboarding.ui.components.OnboardingLevelPage
|
||||
@@ -90,19 +91,21 @@ fun OnboardingScreen(
|
||||
// The content sizes itself against the window rather than the platform default width.
|
||||
properties = DialogProperties(usePlatformDefaultWidth = false),
|
||||
) {
|
||||
Surface(
|
||||
modifier = Modifier
|
||||
.sizeIn(maxWidth = DIALOG_MAX_WIDTH, maxHeight = DIALOG_MAX_HEIGHT)
|
||||
.fillMaxSize(fraction = DIALOG_WINDOW_FRACTION),
|
||||
shape = MaterialTheme.shapes.extraLarge,
|
||||
color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
||||
) {
|
||||
OnboardingContent(
|
||||
uiState = uiState,
|
||||
onLevelSelected = onLevelSelected,
|
||||
onFinish = onFinish,
|
||||
onClose = onDismiss,
|
||||
)
|
||||
ProvideDynamicTypeFontScale {
|
||||
Surface(
|
||||
modifier = Modifier
|
||||
.sizeIn(maxWidth = DIALOG_MAX_WIDTH, maxHeight = DIALOG_MAX_HEIGHT)
|
||||
.fillMaxSize(fraction = DIALOG_WINDOW_FRACTION),
|
||||
shape = MaterialTheme.shapes.extraLarge,
|
||||
color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
||||
) {
|
||||
OnboardingContent(
|
||||
uiState = uiState,
|
||||
onLevelSelected = onLevelSelected,
|
||||
onFinish = onFinish,
|
||||
onClose = onDismiss,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user