Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 847e7766 authored by Evan Laird's avatar Evan Laird
Browse files

[sb] 6sp spacing between the new RAT and the level

Test: manual
Fixes: 409033739
Flag: com.android.settingslib.flags.new_status_bar_icons
Flag: com.android.systemui.status_bar_root_modernization
Change-Id: Ifb28f882c9d4e5fffb9711ded02b23f1accbbce1
parent 08b0e2aa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@
            android:id="@+id/mobile_roaming_updated"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/status_bar_mobile_roam_size_updated"
            android:layout_marginStart="@dimen/status_bar_mobile_type_container_margin_end"
            android:layout_marginStart="@dimen/status_bar_end_side_roam_icon_margin_start"
            android:layout_marginTop="1sp"
            android:visibility="gone"
            android:src="@drawable/stat_sys_roaming_updated"
+2 −1
Original line number Diff line number Diff line
@@ -232,7 +232,8 @@
    <!-- Size of the view that contains the network type. Should be equal to
   status_bar_mobile_type_size + 2, to account for 1sp top and bottom padding -->
    <dimen name="status_bar_mobile_container_height_updated">12sp</dimen>
    <dimen name="status_bar_mobile_type_container_margin_end">2sp</dimen>
    <dimen name="status_bar_mobile_type_container_margin_end">6sp</dimen>
    <dimen name="status_bar_end_side_roam_icon_margin_start">2sp</dimen>
    <!-- Corner radius for the background of the network type indicator. Should be equal to
        status_bar_mobile_container_height / 2 -->
    <dimen name="status_bar_mobile_container_corner_radius_updated">7sp</dimen>
+4 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import com.android.systemui.statusbar.pipeline.shared.ui.composable.StackedMobil
import com.android.systemui.statusbar.pipeline.shared.ui.composable.StackedMobileIconDimensions.IconSpacingSp
import com.android.systemui.statusbar.pipeline.shared.ui.composable.StackedMobileIconDimensions.IconWidthFiveBarsSp
import com.android.systemui.statusbar.pipeline.shared.ui.composable.StackedMobileIconDimensions.IconWidthFourBarsSp
import com.android.systemui.statusbar.pipeline.shared.ui.composable.StackedMobileIconDimensions.RatIndicatorPaddingSp
import com.android.systemui.statusbar.pipeline.shared.ui.composable.StackedMobileIconDimensions.SecondaryBarHeightSp
import kotlin.math.max

@@ -87,10 +88,11 @@ fun StackedMobileIcon(viewModel: StackedMobileIconViewModel, modifier: Modifier
            val ratContext = viewModel.mobileContext ?: LocalContext.current
            CompositionLocalProvider(LocalContext provides ratContext) {
                val height = with(LocalDensity.current) { IconHeightSp.toDp() }
                val paddingEnd = with(LocalDensity.current) { RatIndicatorPaddingSp.toDp() }
                Image(
                    painter = painterResource(it.res),
                    contentDescription = it.contentDescription?.load(),
                    modifier = Modifier.height(height),
                    modifier = Modifier.height(height).padding(end = paddingEnd),
                    colorFilter = ColorFilter.tint(contentColor, BlendMode.SrcIn),
                    contentScale = ContentScale.FillHeight,
                )
@@ -245,6 +247,7 @@ private object StackedMobileIconDimensions {
    val BarsVerticalPaddingSp = 1.5.sp
    val BarsLevelIncrementSp = 1.sp
    val SecondaryBarHeightSp = 3.sp
    val RatIndicatorPaddingSp = 4.sp // 6.sp total between RAT and bars

    // Exclamation cutout dimensions
    val ExclamationCutoutRadiusSp = 5.sp