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

Commonize insets Modifier's (additionally to WindowInsets.*) #3563

Closed
igordmn opened this issue Aug 24, 2023 · 0 comments · Fixed by JetBrains/compose-multiplatform-core#837
Assignees

Comments

@igordmn
Copy link
Collaborator

igordmn commented Aug 24, 2023

Compose 1.5.0-rc04

WindowInsets.* are already commonized, but there are modifiers in Compose that are still Android-only (see WindowInsetsPadding.android.kt):

Modifier.safeDrawingPadding()
...
Modifier.displayCutoutPadding()

It seems they can be easily commonized. Also, they mentioned in the docs

@igordmn igordmn added enhancement New feature or request multiplatform labels Aug 24, 2023
@igordmn igordmn changed the title Commonize insets Modifier's (additionaly to WindowInsets.* itself) Commonize insets Modifier's (additionaly to WindowInsets.*) Aug 24, 2023
@igordmn igordmn changed the title Commonize insets Modifier's (additionaly to WindowInsets.*) Commonize insets Modifier's (additionally to WindowInsets.*) Aug 24, 2023
MatkovIvan added a commit to JetBrains/compose-multiplatform-core that referenced this issue Sep 25, 2023
## Proposed Changes

```diff
+fun Modifier.safeDrawingPadding(): Modifier
+fun Modifier.safeGesturesPadding(): Modifier
+fun Modifier.safeContentPadding(): Modifier
+fun Modifier.systemBarsPadding(): Modifier
+fun Modifier.displayCutoutPadding(): Modifier
+fun Modifier.statusBarsPadding(): Modifier
+fun Modifier.imePadding(): Modifier
+fun Modifier.navigationBarsPadding(): Modifier
+fun Modifier.captionBarPadding(): Modifier
+fun Modifier.waterfallPadding(): Modifier
+fun Modifier.systemGesturesPadding(): Modifier
+fun Modifier.mandatorySystemGesturesPadding(): Modifier
```

## Testing

Test: TBD

## Issues Fixed

Fixes JetBrains/compose-multiplatform#3563
igordmn pushed a commit to JetBrains/compose-multiplatform-core that referenced this issue Nov 15, 2023
## Proposed Changes

```diff
+fun Modifier.safeDrawingPadding(): Modifier
+fun Modifier.safeGesturesPadding(): Modifier
+fun Modifier.safeContentPadding(): Modifier
+fun Modifier.systemBarsPadding(): Modifier
+fun Modifier.displayCutoutPadding(): Modifier
+fun Modifier.statusBarsPadding(): Modifier
+fun Modifier.imePadding(): Modifier
+fun Modifier.navigationBarsPadding(): Modifier
+fun Modifier.captionBarPadding(): Modifier
+fun Modifier.waterfallPadding(): Modifier
+fun Modifier.systemGesturesPadding(): Modifier
+fun Modifier.mandatorySystemGesturesPadding(): Modifier
```

## Testing

Test: TBD

## Issues Fixed

Fixes JetBrains/compose-multiplatform#3563
igordmn pushed a commit to JetBrains/compose-multiplatform-core that referenced this issue Nov 16, 2023
…r's (#837)

## Proposed Changes

```diff
+fun Modifier.safeDrawingPadding(): Modifier
+fun Modifier.safeGesturesPadding(): Modifier
+fun Modifier.safeContentPadding(): Modifier
+fun Modifier.systemBarsPadding(): Modifier
+fun Modifier.displayCutoutPadding(): Modifier
+fun Modifier.statusBarsPadding(): Modifier
+fun Modifier.imePadding(): Modifier
+fun Modifier.navigationBarsPadding(): Modifier
+fun Modifier.captionBarPadding(): Modifier
+fun Modifier.waterfallPadding(): Modifier
+fun Modifier.systemGesturesPadding(): Modifier
+fun Modifier.mandatorySystemGesturesPadding(): Modifier
```

## Testing

Test: TBD

## Issues Fixed

Fixes JetBrains/compose-multiplatform#3563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants