[JEWEL-1298] Fix JDialogRenderer Density Issues#3475
Open
DanielSouzaBertoldi wants to merge 1 commit intoJetBrains:masterfrom
Open
[JEWEL-1298] Fix JDialogRenderer Density Issues#3475DanielSouzaBertoldi wants to merge 1 commit intoJetBrains:masterfrom
DanielSouzaBertoldi wants to merge 1 commit intoJetBrains:masterfrom
Conversation
Collaborator
Author
rock3r
approved these changes
Apr 2, 2026
Collaborator
|
@DanielSouzaBertoldi we can disable it if we want to, but it does check more than what ktfmt enforces IIRC |
daaria-s
reviewed
Apr 8, 2026
| @@ -419,7 +421,7 @@ private fun Rectangle.withDensity(density: Float): Rectangle = | |||
| @Composable | |||
| private fun ProvideValuesFromOtherContext(context: CompositionLocalContext, content: @Composable () -> Unit) { | |||
| val existingContext = currentCompositionLocalContext | |||
| CompositionLocalProvider(context) { CompositionLocalProvider(existingContext, content) } | |||
| CompositionLocalProvider(existingContext) { CompositionLocalProvider(context, content) } | |||
Collaborator
There was a problem hiding this comment.
I think I found an issue connected to this change, pls correct me if I'm wrong
If I enable Custom Popup Renderer and try to open Sub menus, it just disappears and i cannot open further submenus. Video is attached.
When I revert your change, it works fine.
After some discussion with AI, he told me that "a submenu is itself another popup, opened from inside the first popup, and for that nested popup to appear correctly, the submenu code must see the current popup host component, but because of the change it sees the original parent window component." Does it make any sense? 😄
Screen.Recording.2026-04-08.at.15.26.49.mov
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


(this description was generated by
jewel-pr-preparer)JDialogRendererhad two density-related bugs affecting popup positioning and content rendering when the app overridesLocalDensity.Changes
LocalDensity.currentwithdialog.density()(the actual screen scale fromgraphicsConfiguration) when converting Compose layout coordinates to AWT logical pixels inwithDensity— the screen scale factor is always the correct ratio here, independent of any app-level density override.ProvideValuesFromOtherContextto provide the ComposePanel's defaults as the outer context and the caller's composition locals as the inner context, so the caller's values (including anyLocalDensityoverride) correctly win over ComposePanel defaults instead of being silently discarded.Release notes
Bug fixes
JDialogRendererincorrectly usingLocalDensityfor AWT coordinate conversion, causing popups to appear at the wrong position or size when the app overrides the Compose density.ProvideValuesFromOtherContextswallowing caller-provided composition locals (such asLocalDensity) in favor ofComposePaneldefaults.Demo
Screen.Recording.2026-04-01.at.09.41.20.mov
Screen.Recording.2026-04-01.at.09.39.03.mov