-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompositionLocals given in application scope are not take into account in window scope (such as LocalLayoutDirection) #3571
Comments
mahozad
changed the title
Bug with layout direction when using HorizontalArrangement.spacedBy in a Row
Bug with layout direction when using Arrangement.spacedBy in a Row
Aug 26, 2023
When I moved fun main() {
application {
Window(onCloseRequest = ::exitApplication) {
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
Row(horizontalArrangement = spacedBy(24.dp)) {
Box(modifier = Modifier.size(64.dp).background(Color.Red))
Box(modifier = Modifier.size(64.dp).background(Color.Green))
}
}
}
}
} So, it should be the same problem as this: |
Walingar
changed the title
Bug with layout direction when using Arrangement.spacedBy in a Row
CompositionLocals given in application scope are not takein into account in window scope (such as LocalLayoutDirection)
Aug 28, 2023
Walingar
changed the title
CompositionLocals given in application scope are not takein into account in window scope (such as LocalLayoutDirection)
CompositionLocals given in application scope are not take into account in window scope (such as LocalLayoutDirection)
Aug 28, 2023
Walingar
added
the
discussion
Need further discussion to understand if it actually needed
label
Aug 28, 2023
Thanks for the relevant information. |
m-sasha
removed
the
discussion
Need further discussion to understand if it actually needed
label
Aug 29, 2023
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
All
Arrangement.Absolute.spacedBy()
overloads refer toArrangement.spacedBy()
in their documentation for the direction-aware alternative.But the
Arrangement.spacedBy()
does not honor RTL layout direction.Affected platforms
Versions
To Reproduce
Expected behavior
When layout direction is RTL, the components should be placed in reverse order (green box should be on the left).
The text was updated successfully, but these errors were encountered: