Loading packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/button/ui/composable/ButtonComponent.kt +1 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ class ButtonComponent( } else { MaterialTheme.colorScheme.onSurface }, useModifierBasedImplementation = true, onClick = { onClick(it, gravity) }, ) { Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { Loading packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/mediaoutput/ui/composable/MediaOutputComponent.kt +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ class MediaOutputComponent @Inject constructor(private val viewModel: MediaOutpu MaterialTheme.colorScheme.surfaceContainerHighest }, shape = RoundedCornerShape(28.dp), useModifierBasedImplementation = true, onClick = if (enabled) { { viewModel.onBarClick(it) } Loading packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/popup/ui/composable/VolumePanelPopup.kt +5 −8 Original line number Diff line number Diff line Loading @@ -68,10 +68,7 @@ constructor( content: @Composable (SystemUIDialog) -> Unit, ) { val dialog = dialogFactory.create( theme = R.style.Theme_VolumePanel_Popup, dialogGravity = gravity, ) { dialogFactory.create(theme = R.style.Theme_VolumePanel_Popup, dialogGravity = gravity) { PopupComposable(it, title, content) } val controller = expandable?.dialogTransitionController() Loading @@ -97,7 +94,7 @@ constructor( Box( modifier = Modifier.padding(horizontal = 80.dp).fillMaxWidth().wrapContentHeight(), contentAlignment = Alignment.Center contentAlignment = Alignment.Center, ) { title(dialog) } Loading @@ -105,7 +102,7 @@ constructor( Box( modifier = Modifier.padding(horizontal = 16.dp).fillMaxWidth().wrapContentHeight(), contentAlignment = Alignment.Center contentAlignment = Alignment.Center, ) { content(dialog) } Loading @@ -116,8 +113,8 @@ constructor( onClick = { dialog.dismiss() }, colors = IconButtonDefaults.iconButtonColors( contentColor = MaterialTheme.colorScheme.outline ) contentColor = MaterialTheme.colorScheme.onSurfaceVariant ), ) { Icon( painterResource(R.drawable.ic_close), Loading packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/selector/ui/composable/VolumePanelRadioButtons.kt +9 −12 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ fun VolumePanelRadioButtonBar( indicatorBackgroundCornerSize: CornerSize = CornerSize(VolumePanelRadioButtonBarDefaults.DefaultIndicatorBackgroundCornerRadius), colors: VolumePanelRadioButtonBarColors = VolumePanelRadioButtonBarDefaults.defaultColors(), content: VolumePanelRadioButtonBarScope.() -> Unit content: VolumePanelRadioButtonBarScope.() -> Unit, ) { val scope = VolumePanelRadioButtonBarScopeImpl().apply(content).apply { Loading @@ -108,16 +108,13 @@ fun VolumePanelRadioButtonBar( Modifier.layoutId(RadioButtonBarComponent.Indicator) .offset { IntOffset(offsetAnimatable.value, 0) } .padding(indicatorBackgroundPadding) .background( colors.indicatorColor, RoundedCornerShape(indicatorCornerSize), ) .background(colors.indicatorColor, RoundedCornerShape(indicatorCornerSize)) ) Row( modifier = Modifier.layoutId(RadioButtonBarComponent.Buttons) .padding(indicatorBackgroundPadding), horizontalArrangement = Arrangement.spacedBy(spacing) horizontalArrangement = Arrangement.spacedBy(spacing), ) { for (itemIndex in items.indices) { val item = items[itemIndex] Loading @@ -134,7 +131,7 @@ fun VolumePanelRadioButtonBar( .clickable( interactionSource = null, indication = null, onClick = { items[itemIndex].onItemSelected() } onClick = { items[itemIndex].onItemSelected() }, ), horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically, Loading @@ -155,7 +152,7 @@ fun VolumePanelRadioButtonBar( .padding( start = indicatorBackgroundPadding, top = labelIndicatorBackgroundSpacing, end = indicatorBackgroundPadding end = indicatorBackgroundPadding, ) .clearAndSetSemantics {}, horizontalArrangement = Arrangement.spacedBy(spacing), Loading @@ -166,7 +163,7 @@ fun VolumePanelRadioButtonBar( modifier = Modifier.weight(1f), onClick = { items[itemIndex].onItemSelected() }, shape = RoundedCornerShape(cornersRadius), contentPadding = PaddingValues(cornersRadius) contentPadding = PaddingValues(cornersRadius), ) { val item = items[itemIndex] if (item.icon !== Empty) { Loading Loading @@ -210,7 +207,7 @@ private class BarMeasurePolicy( override fun MeasureScope.measure( measurables: List<Measurable>, constraints: Constraints constraints: Constraints, ): MeasureResult { val fillWidthConstraints = constraints.copy(minWidth = constraints.maxWidth) val buttonsPlaceable: Placeable = Loading Loading @@ -307,10 +304,10 @@ object VolumePanelRadioButtonBarDefaults { */ @Composable fun defaultColors( indicatorColor: Color = MaterialTheme.colorScheme.tertiaryContainer, indicatorColor: Color = MaterialTheme.colorScheme.tertiary, indicatorBackgroundColor: Color = MaterialTheme.colorScheme.surface, iconColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, selectedIconColor: Color = MaterialTheme.colorScheme.onTertiaryContainer, selectedIconColor: Color = MaterialTheme.colorScheme.onTertiary, labelColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, selectedLabelColor: Color = MaterialTheme.colorScheme.onSurface, ): VolumePanelRadioButtonBarColors = Loading packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ constructor( text = stringResource(R.string.volume_panel_spatial_audio_title), style = MaterialTheme.typography.titleMedium, textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.onSurface, maxLines = 1, ) } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/button/ui/composable/ButtonComponent.kt +1 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ class ButtonComponent( } else { MaterialTheme.colorScheme.onSurface }, useModifierBasedImplementation = true, onClick = { onClick(it, gravity) }, ) { Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { Loading
packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/mediaoutput/ui/composable/MediaOutputComponent.kt +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ class MediaOutputComponent @Inject constructor(private val viewModel: MediaOutpu MaterialTheme.colorScheme.surfaceContainerHighest }, shape = RoundedCornerShape(28.dp), useModifierBasedImplementation = true, onClick = if (enabled) { { viewModel.onBarClick(it) } Loading
packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/popup/ui/composable/VolumePanelPopup.kt +5 −8 Original line number Diff line number Diff line Loading @@ -68,10 +68,7 @@ constructor( content: @Composable (SystemUIDialog) -> Unit, ) { val dialog = dialogFactory.create( theme = R.style.Theme_VolumePanel_Popup, dialogGravity = gravity, ) { dialogFactory.create(theme = R.style.Theme_VolumePanel_Popup, dialogGravity = gravity) { PopupComposable(it, title, content) } val controller = expandable?.dialogTransitionController() Loading @@ -97,7 +94,7 @@ constructor( Box( modifier = Modifier.padding(horizontal = 80.dp).fillMaxWidth().wrapContentHeight(), contentAlignment = Alignment.Center contentAlignment = Alignment.Center, ) { title(dialog) } Loading @@ -105,7 +102,7 @@ constructor( Box( modifier = Modifier.padding(horizontal = 16.dp).fillMaxWidth().wrapContentHeight(), contentAlignment = Alignment.Center contentAlignment = Alignment.Center, ) { content(dialog) } Loading @@ -116,8 +113,8 @@ constructor( onClick = { dialog.dismiss() }, colors = IconButtonDefaults.iconButtonColors( contentColor = MaterialTheme.colorScheme.outline ) contentColor = MaterialTheme.colorScheme.onSurfaceVariant ), ) { Icon( painterResource(R.drawable.ic_close), Loading
packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/selector/ui/composable/VolumePanelRadioButtons.kt +9 −12 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ fun VolumePanelRadioButtonBar( indicatorBackgroundCornerSize: CornerSize = CornerSize(VolumePanelRadioButtonBarDefaults.DefaultIndicatorBackgroundCornerRadius), colors: VolumePanelRadioButtonBarColors = VolumePanelRadioButtonBarDefaults.defaultColors(), content: VolumePanelRadioButtonBarScope.() -> Unit content: VolumePanelRadioButtonBarScope.() -> Unit, ) { val scope = VolumePanelRadioButtonBarScopeImpl().apply(content).apply { Loading @@ -108,16 +108,13 @@ fun VolumePanelRadioButtonBar( Modifier.layoutId(RadioButtonBarComponent.Indicator) .offset { IntOffset(offsetAnimatable.value, 0) } .padding(indicatorBackgroundPadding) .background( colors.indicatorColor, RoundedCornerShape(indicatorCornerSize), ) .background(colors.indicatorColor, RoundedCornerShape(indicatorCornerSize)) ) Row( modifier = Modifier.layoutId(RadioButtonBarComponent.Buttons) .padding(indicatorBackgroundPadding), horizontalArrangement = Arrangement.spacedBy(spacing) horizontalArrangement = Arrangement.spacedBy(spacing), ) { for (itemIndex in items.indices) { val item = items[itemIndex] Loading @@ -134,7 +131,7 @@ fun VolumePanelRadioButtonBar( .clickable( interactionSource = null, indication = null, onClick = { items[itemIndex].onItemSelected() } onClick = { items[itemIndex].onItemSelected() }, ), horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically, Loading @@ -155,7 +152,7 @@ fun VolumePanelRadioButtonBar( .padding( start = indicatorBackgroundPadding, top = labelIndicatorBackgroundSpacing, end = indicatorBackgroundPadding end = indicatorBackgroundPadding, ) .clearAndSetSemantics {}, horizontalArrangement = Arrangement.spacedBy(spacing), Loading @@ -166,7 +163,7 @@ fun VolumePanelRadioButtonBar( modifier = Modifier.weight(1f), onClick = { items[itemIndex].onItemSelected() }, shape = RoundedCornerShape(cornersRadius), contentPadding = PaddingValues(cornersRadius) contentPadding = PaddingValues(cornersRadius), ) { val item = items[itemIndex] if (item.icon !== Empty) { Loading Loading @@ -210,7 +207,7 @@ private class BarMeasurePolicy( override fun MeasureScope.measure( measurables: List<Measurable>, constraints: Constraints constraints: Constraints, ): MeasureResult { val fillWidthConstraints = constraints.copy(minWidth = constraints.maxWidth) val buttonsPlaceable: Placeable = Loading Loading @@ -307,10 +304,10 @@ object VolumePanelRadioButtonBarDefaults { */ @Composable fun defaultColors( indicatorColor: Color = MaterialTheme.colorScheme.tertiaryContainer, indicatorColor: Color = MaterialTheme.colorScheme.tertiary, indicatorBackgroundColor: Color = MaterialTheme.colorScheme.surface, iconColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, selectedIconColor: Color = MaterialTheme.colorScheme.onTertiaryContainer, selectedIconColor: Color = MaterialTheme.colorScheme.onTertiary, labelColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, selectedLabelColor: Color = MaterialTheme.colorScheme.onSurface, ): VolumePanelRadioButtonBarColors = Loading
packages/SystemUI/compose/features/src/com/android/systemui/volume/panel/component/spatialaudio/ui/composable/SpatialAudioPopup.kt +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ constructor( text = stringResource(R.string.volume_panel_spatial_audio_title), style = MaterialTheme.typography.titleMedium, textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.onSurface, maxLines = 1, ) } Loading