Skip to content

Adds support for UiMediaScope in Desktop - #3341

Open
Apolo (ApoloApps) wants to merge 7 commits into
JetBrains:jb-mainfrom
ApoloApps:uiMediaSupportInDesktop
Open

Adds support for UiMediaScope in Desktop#3341
Apolo (ApoloApps) wants to merge 7 commits into
JetBrains:jb-mainfrom
ApoloApps:uiMediaSupportInDesktop

Conversation

@ApoloApps

@ApoloApps Apolo (ApoloApps) commented Aug 25, 2026

Copy link
Copy Markdown

Follow-up of #3339
Merge after mentioned PR is merged (desktop changes only, skiko logic is handled in said PR)

Fixes https://youtrack.jetbrains.com/issue/CMP-10741/Desktop-Report-real-device-characteristics-to-mediaQuery

Release Notes

N/A

@ApoloApps

Copy link
Copy Markdown
Author

Comment on lines +30 to +34
override val windowWidth: Dp
get() = windowInfo.containerDpSize.width

override val windowHeight: Dp
get() = windowInfo.containerDpSize.height

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not important, but windowInfo.containerDpSize refers to the container (excludes insets), and this refers to the window (includes insets).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ivan Matkov (MatkovIvan) pushed a commit that referenced this pull request Sep 1, 2026
Smaller change to support UiMediaScope in skiko platforms

Fixes
[CMP-10481](https://youtrack.jetbrains.com/issue/CMP-10481/Add-Support-for-UiMediaScope)
(common part)

iOS PR:
#3340
Desktop PR:
#3341


## Release Notes
### Features - Multiple Platforms
- Add support for mediaQuery calls which allows to modify Composables
depending on device characteristics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants