weather: remove StatBlock font-scale cap (respect large font sizes)
- Commit
94721d7265b0119557057a36eeb24ae61303c907- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-16 03:38 UTC (3 months ago)
- Parents
8f57fe9
Diff
weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.ktindex 631e8dc9d3..aef038ff48 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt@@ -8,11 +8,8 @@ import androidx.compose.foundation.shape.CircleShape import com.vayunmathur.library.ui.MaterialTheme import com.vayunmathur.library.ui.Surface import androidx.compose.runtime.Composable-import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Shape-import androidx.compose.ui.platform.LocalDensity-import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.dp /**@@ -20,11 +17,6 @@ import androidx.compose.ui.unit.dp * with a 2.dp shadow and the given [shape], wrapping a square * (`aspectRatio(1f)`) [Box] that fills it. Blocks lay out their content with * the usual [BoxScope] alignment modifiers.- *- * Block content runs with the font scale capped at 1.3×: the tile is a fixed- * square/circle, so at large system font sizes the big value would otherwise- * overflow the shape. Capping lets text still grow with accessibility settings- * but bounds it so it always fits. */ @Composable fun StatBlock(@@ -36,16 +28,7 @@ fun StatBlock( shape = shape, shadowElevation = 2.dp, ) {- Box(modifier = Modifier.fillMaxSize().aspectRatio(1f)) {- CompositionLocalProvider(- LocalDensity provides Density(- density = LocalDensity.current.density,- fontScale = LocalDensity.current.fontScale.coerceAtMost(1.3f),- ),- ) {- [email protected]()- }- }+ Box(modifier = Modifier.fillMaxSize().aspectRatio(1f), content = content) } }