Skip to content

Commit

Permalink
Merge pull request #680 from Orange-OpenSource/fix-odstexttogglebutto…
Browse files Browse the repository at this point in the history
…nsrow-accessibility

Change OdsTextToggleButtonsRow selected button text color for accessibility reason
  • Loading branch information
florentmaitre authored Oct 24, 2023
2 parents 7104d76 + da65ab8 commit cd4b26e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- \[App\] Change illustrations alignment for slider and text field components ([#618](https://github.com/Orange-OpenSource/ods-android/issues/618))
- \[Lib\] Fix a bug where chip was not properly selected in `OdsChoiceChipsFlowRow` ([#650](https://github.com/Orange-OpenSource/ods-android/issues/650))
- \[Lib\] Change text color of `OdsTextToggleButtonsRow` selected button for accessibility reason ([#559](https://github.com/Orange-OpenSource/ods-android/issues/559))
- \[Lib\] Fix vertical padding of buttons in `OdsTextToggleButtonsRow` ([#559](https://github.com/Orange-OpenSource/ods-android/issues/559))

## [0.16.0](https://github.com/Orange-OpenSource/ods-android/compare/0.15.1...0.16.0) - 2023-10-10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@ private fun RowScope.TextToggleButtonsRowItem(
text = textToggleButton.text,
enabled = textToggleButton.enabled,
modifier = Modifier
.background(color = buttonToggleBackgroundColor(displaySurface).copy(alpha = backgroundAlpha)).let {
.background(color = buttonToggleBackgroundColor(displaySurface).copy(alpha = backgroundAlpha))
.fillMaxHeight()
.let {
if (sameItemsWeight) it.weight(1f) else it
},
maxLines = 1,
overflow = TextOverflow.Ellipsis,
displaySurface = displaySurface,
style = if (selected) OdsTextButtonStyle.Primary else OdsTextButtonStyle.Default,
style = OdsTextButtonStyle.Default,
onClick = { onClick(index) }
)
}
Expand Down

0 comments on commit cd4b26e

Please sign in to comment.