-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[JEWEL-1013,JEWEL-1016] Using compose drop shadow APIs for popups #3253
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
base: master
Are you sure you want to change the base?
Conversation
Shadow( | ||
radius = style.metrics.shadowSize, | ||
color = colors.shadow, | ||
offset = DpOffset(0.dp, style.metrics.shadowSize / 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.setCancelOnClickOutside(currentProperties.dismissOnClickOutside) | ||
.setCancelOnWindowDeactivation(currentProperties.dismissOnClickOutside) | ||
.setLocateWithinScreenBounds(false) | ||
.setShowShadow(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right approach — we should use the same shadow that other popups do (which is drawn by the OS, now Swing).
Us drawing our own shadow is the right choice only when we're not using native popups. It's a fallback.
If the native popups don't show shadows, I think the issue may be in CMP clipping it out (that famous custom property I keep asking you about and that I do not think should be at all necessary for native popups!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) Does the native popup shadow work now, or do we still need a separate bug for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be good. I'll boot the Windows/Linux VMs to ensure it works on other platforms as well. But all CMP and Native shadows should have the same appearance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's not working because we need to use the 'Undecorated' window type to hide the navigation bar. I'll check if there are other ways to achieve similar results.
The "Window.shadow" property only applies to MacOS :/
...-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/popup/JDialogRenderer.kt
Outdated
Show resolved
Hide resolved
4c1f43f
to
a429927
Compare
Evidences