Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/scaffold/CustomizedAppBar.kt +9 −3 Original line number Diff line number Diff line Loading @@ -253,6 +253,7 @@ private fun SingleRowTopAppBar( hideTitleSemantics = false, navigationIcon = navigationIcon, actions = actionsRow, titleScaleDisabled = false, ) } } Loading Loading @@ -426,6 +427,7 @@ private fun TwoRowsTopAppBar( * accessibility services at the same time, when animating between collapsed / expanded states. * @param navigationIcon a navigation icon [Composable] * @param actions actions [Composable] * @param titleScaleDisabled whether the title font scaling is disabled. Default is disabled. */ @Composable private fun TopAppBarLayout( Loading @@ -443,6 +445,7 @@ private fun TopAppBarLayout( hideTitleSemantics: Boolean, navigationIcon: @Composable () -> Unit, actions: @Composable () -> Unit, titleScaleDisabled: Boolean = true, ) { Layout( { Loading @@ -466,9 +469,12 @@ private fun TopAppBarLayout( ProvideTextStyle(value = titleTextStyle) { CompositionLocalProvider( LocalContentColor provides titleContentColor, // Disable the title font scaling by only passing the density but not the // font scale. LocalDensity provides Density(density = LocalDensity.current.density), LocalDensity provides with(LocalDensity.current) { Density( density = density, fontScale = if (titleScaleDisabled) 1f else fontScale, ) }, content = title ) } Loading Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/scaffold/CustomizedAppBar.kt +9 −3 Original line number Diff line number Diff line Loading @@ -253,6 +253,7 @@ private fun SingleRowTopAppBar( hideTitleSemantics = false, navigationIcon = navigationIcon, actions = actionsRow, titleScaleDisabled = false, ) } } Loading Loading @@ -426,6 +427,7 @@ private fun TwoRowsTopAppBar( * accessibility services at the same time, when animating between collapsed / expanded states. * @param navigationIcon a navigation icon [Composable] * @param actions actions [Composable] * @param titleScaleDisabled whether the title font scaling is disabled. Default is disabled. */ @Composable private fun TopAppBarLayout( Loading @@ -443,6 +445,7 @@ private fun TopAppBarLayout( hideTitleSemantics: Boolean, navigationIcon: @Composable () -> Unit, actions: @Composable () -> Unit, titleScaleDisabled: Boolean = true, ) { Layout( { Loading @@ -466,9 +469,12 @@ private fun TopAppBarLayout( ProvideTextStyle(value = titleTextStyle) { CompositionLocalProvider( LocalContentColor provides titleContentColor, // Disable the title font scaling by only passing the density but not the // font scale. LocalDensity provides Density(density = LocalDensity.current.density), LocalDensity provides with(LocalDensity.current) { Density( density = density, fontScale = if (titleScaleDisabled) 1f else fontScale, ) }, content = title ) } Loading