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

Commit 1533eb8d authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Fix volume label position when its width is too short" into main

parents 3ef27454 7c975ff0
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -108,15 +108,20 @@ private class VolumeSliderContentMeasurePolicy(private val isEnabled: Boolean) :
            measurables
                .fastFirst { it.layoutId == VolumeSliderContentComponent.Label }
                .measure(constraints)
        val layoutWidth: Int = constraints.maxWidth
        val layoutWidth: Int =
            if (isEnabled) {
                labelPlaceable.width
            } else {
                constraints.maxWidth
            }
        val fullLayoutWidth: Int =
            if (isEnabled) {
                // PlatformSlider uses half of the available space for the enabled state.
                // This is using it to allow disabled message to take whole space when animating to
                // prevent it from jumping left to right
                layoutWidth * 2
                constraints.maxWidth * 2
            } else {
                layoutWidth
                constraints.maxWidth
            }

        val disabledMessagePlaceable =