improvement: Use auto-size text for the Keyguard label on an empty page
This commit is contained in:
parent
943fb0dc45
commit
d536404e0a
|
@ -65,6 +65,7 @@ import com.artemchep.keyguard.ui.surface.color
|
||||||
import com.artemchep.keyguard.ui.surface.splitHigh
|
import com.artemchep.keyguard.ui.surface.splitHigh
|
||||||
import com.artemchep.keyguard.ui.surface.splitLow
|
import com.artemchep.keyguard.ui.surface.splitLow
|
||||||
import com.artemchep.keyguard.ui.surface.surfaceElevationColor
|
import com.artemchep.keyguard.ui.surface.surfaceElevationColor
|
||||||
|
import com.artemchep.keyguard.ui.text.AutoSizeText
|
||||||
import com.artemchep.keyguard.ui.util.VerticalDivider
|
import com.artemchep.keyguard.ui.util.VerticalDivider
|
||||||
import org.kodein.di.compose.rememberInstance
|
import org.kodein.di.compose.rememberInstance
|
||||||
|
|
||||||
|
@ -232,12 +233,14 @@ fun TwoPaneScaffoldScope.TwoPaneLayout(
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.onBackground,
|
tint = MaterialTheme.colorScheme.onBackground,
|
||||||
)
|
)
|
||||||
Text(
|
val textStyle = MaterialTheme.typography.displayLarge
|
||||||
|
AutoSizeText(
|
||||||
text = remember {
|
text = remember {
|
||||||
keyguardSpan()
|
keyguardSpan()
|
||||||
},
|
},
|
||||||
textAlign = TextAlign.Center,
|
minTextSize = MaterialTheme.typography.displayMedium.fontSize,
|
||||||
style = MaterialTheme.typography.displayLarge,
|
maxTextSize = textStyle.fontSize,
|
||||||
|
style = textStyle,
|
||||||
color = MaterialTheme.colorScheme.onBackground,
|
color = MaterialTheme.colorScheme.onBackground,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue