diff --git a/app/src/main/kotlin/eu/kanade/tachiyomi/ui/reader/PageIndicatorText.kt b/app/src/main/kotlin/eu/kanade/tachiyomi/ui/reader/PageIndicatorText.kt index 0cfb8475c..11fa2f83a 100644 --- a/app/src/main/kotlin/eu/kanade/tachiyomi/ui/reader/PageIndicatorText.kt +++ b/app/src/main/kotlin/eu/kanade/tachiyomi/ui/reader/PageIndicatorText.kt @@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.drawscope.Stroke import androidx.compose.ui.text.TextStyle @@ -19,24 +20,19 @@ fun PageIndicatorText( val text = "$currentPage / $totalPages" - Box { - Text( - text = text, - color = Color(45, 45, 45), - fontSize = MaterialTheme.typography.bodySmall.fontSize, - fontWeight = FontWeight.Bold, - letterSpacing = 1.sp, - style = TextStyle.Default.copy( - drawStyle = Stroke(width = 4f), - ), - ) + val style = TextStyle( + color = Color(235, 235, 235), + fontSize = MaterialTheme.typography.bodySmall.fontSize, + fontWeight = FontWeight.Bold, + letterSpacing = 1.sp, + ) + val strokeStyle = style.copy( + color = Color(45, 45, 45), + drawStyle = Stroke(width = 4f), + ) - Text( - text = text, - color = Color(235, 235, 235), - fontSize = MaterialTheme.typography.bodySmall.fontSize, - fontWeight = FontWeight.Bold, - letterSpacing = 1.sp, - ) + Box(contentAlignment = Alignment.Center) { + Text(text = text, style = strokeStyle) + Text(text = text, style = style) } }