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

Commit f379e8d1 authored by Evan Laird's avatar Evan Laird
Browse files

[dualsim] constrain dual sim RAT height to 12sp

The bug here is that the drawables themselves have weird intrinsic
sizes, and the ones that are narrow sometimes get really big if we use
Modifier.fillMaxHeight.

The fix is to explicitly set their height.

Fixes: 404325538
Test: manual using demo mode
Flag: com.android.settingslib.flags.new_status_bar_icons
Flag: com.android.systemui.status_bar_root_modernization
Change-Id: Iaefff2c9577703757745478ba6dbe27127d05363
parent b9a00040
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -19,10 +19,10 @@ package com.android.systemui.statusbar.pipeline.shared.ui.composable
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Arrangement.spacedBy
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.material3.LocalContentColor
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
@@ -75,7 +75,8 @@ fun StackedMobileIcon(viewModel: StackedMobileIconViewModel, modifier: Modifier
        modifier = modifier.padding(horizontal = padding),
    ) {
        viewModel.networkTypeIcon?.let {
            Icon(it, tint = contentColor, modifier = Modifier.fillMaxHeight())
            val height = with(LocalDensity.current) { IconHeightSp.toDp() }
            Icon(it, tint = contentColor, modifier = Modifier.height(height).wrapContentWidth())
        }

        StackedMobileIcon(dualSim, contentColor)