Skip to content

Commit

Permalink
Merge "Update custom slider thumb + label samples so that the text in…
Browse files Browse the repository at this point in the history
…side the label will scale based on the display / text size of the device." into androidx-main
  • Loading branch information
wcshi authored and Gerrit Code Review committed May 18, 2024
2 parents c7b620b + 760eb1b commit 89ec14e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.requiredSizeIn
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.sizeIn
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -167,7 +168,7 @@ fun SliderWithCustomThumbSample() {
label = {
PlainTooltip(
modifier = Modifier
.requiredSize(45.dp, 25.dp)
.sizeIn(45.dp, 25.dp)
.wrapContentWidth()
) {
Text("%.2f".format(sliderPosition))
Expand Down Expand Up @@ -396,7 +397,7 @@ fun RangeSliderWithCustomComponents() {
label = {
PlainTooltip(
modifier = Modifier
.requiredSize(45.dp, 25.dp)
.sizeIn(45.dp, 25.dp)
.wrapContentWidth()
) {
Text("%.2f".format(rangeSliderState.activeRangeStart))
Expand Down

0 comments on commit 89ec14e

Please sign in to comment.