Skip to content
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

AlertDialog shape not correctly applied (Surface has its own shape) #1705

Closed
quentin23soleil opened this issue Jan 17, 2022 · 7 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@quentin23soleil
Copy link
Contributor

JB-Compose 1.0.1 as well as latest alpha 1.1.0-alpha1-dev550.

Related to this slack message

Surface has a RectangleShape which is not overridden by AlertDialog resulting of a MaterialTheme.colors.surface rectangle shaped background (grey in the screenshot).

(sorry for the colours 👀 )
image

@akurasov
Copy link
Contributor

Could you share a small reproducer for it, please? Better with not so bright colors )

@akurasov akurasov self-assigned this Jan 18, 2022
@akurasov akurasov added desktop bug Something isn't working labels Jan 18, 2022
@quentin23soleil
Copy link
Contributor Author

quentin23soleil commented Jan 18, 2022

Sure, any AlertDialog with a shape will reproduce the issue.

        AlertDialog(
            backgroundColor = Color.Black,
            shape = RoundedCornerShape(16.dp),
            onDismissRequest = {},
            buttons = {
                Button(
                    onClick = {},
                    content = {
                        Text("Ok")
                    })
            },
            title = { Text("Error") },
            text = { Text("Hello alert dialog") }
        )

@dragossusi
Copy link

This always happens to me on desktop, on android it works correctly

@ScottPierce
Copy link
Contributor

My team is encountering this as well.

@dima-avdeev-jb
Copy link
Contributor

Reproduce in this repository:
https://github.com/dima-avdeev-jb/reproduce-bug-with-alert-dialog

@sproctor
Copy link

This is a duplicate of #1269.

@dima-avdeev-jb dima-avdeev-jb added duplicate This issue or pull request already exists and removed bug Something isn't working desktop labels Dec 28, 2022
@dima-avdeev-jb
Copy link
Contributor

Duplicate of #1269

@dima-avdeev-jb dima-avdeev-jb marked this as a duplicate of #1269 Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants