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

Commit c56cdaaa authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Fix label of brightness slider

Use text for the label of the brightness slider. This results in it
being attached to the slider.

Test: manual, talkback
Fixes: 413255177
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Change-Id: I24365ddb573365e42816eb469fe5ffb050664475
parent 71572aa7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -70,8 +70,9 @@ import androidx.compose.ui.input.pointer.pointerInteropFilter
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
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.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -209,7 +210,9 @@ fun BrightnessSlider(
        modifier =
            modifier
                .sysuiResTag("slider")
                .semantics(mergeDescendants = true) { this.contentDescription = contentDescription }
                .semantics(mergeDescendants = true) {
                    this.text = AnnotatedString(contentDescription)
                }
                .thenIf(isRestricted) {
                    Modifier.clickable {
                        if (restriction is PolicyRestriction.Restricted) {