Loading packages/SystemUI/src/com/android/systemui/brightness/ui/compose/BrightnessSlider.kt +12 −3 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.graphics.drawscope.scale import androidx.compose.ui.graphics.drawscope.translate import androidx.compose.ui.graphics.painter.BitmapPainter import androidx.compose.ui.graphics.painter.ColorPainter Loading @@ -74,6 +75,7 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.text import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.app.tracing.coroutines.launchTraced as launch Loading Loading @@ -177,9 +179,16 @@ fun BrightnessSlider( val inactiveIconColor = colors.inactiveTickColor val trackIcon: DrawScope.(Offset, Color, Float) -> Unit = remember { { offset, color, alpha -> val rtl = layoutDirection == LayoutDirection.Rtl scale(if (rtl) -1f else 1f, 1f) { translate(offset.x + IconPadding.toPx(), offset.y) { with(painter) { draw(IconSize.toSize(), colorFilter = ColorFilter.tint(color), alpha = alpha) draw( IconSize.toSize(), colorFilter = ColorFilter.tint(color), alpha = alpha, ) } } } } Loading Loading
packages/SystemUI/src/com/android/systemui/brightness/ui/compose/BrightnessSlider.kt +12 −3 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.graphics.drawscope.scale import androidx.compose.ui.graphics.drawscope.translate import androidx.compose.ui.graphics.painter.BitmapPainter import androidx.compose.ui.graphics.painter.ColorPainter Loading @@ -74,6 +75,7 @@ import androidx.compose.ui.semantics.semantics import androidx.compose.ui.semantics.text import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.app.tracing.coroutines.launchTraced as launch Loading Loading @@ -177,9 +179,16 @@ fun BrightnessSlider( val inactiveIconColor = colors.inactiveTickColor val trackIcon: DrawScope.(Offset, Color, Float) -> Unit = remember { { offset, color, alpha -> val rtl = layoutDirection == LayoutDirection.Rtl scale(if (rtl) -1f else 1f, 1f) { translate(offset.x + IconPadding.toPx(), offset.y) { with(painter) { draw(IconSize.toSize(), colorFilter = ColorFilter.tint(color), alpha = alpha) draw( IconSize.toSize(), colorFilter = ColorFilter.tint(color), alpha = alpha, ) } } } } Loading