From 155d94073187296f4bf45d72996caf624577b87e Mon Sep 17 00:00:00 2001 From: Mori-Atsushi Date: Sat, 6 May 2023 15:56:03 +0900 Subject: [PATCH 1/2] Update version name --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0884955..5f06eeb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,7 @@ org.jetbrains.compose.experimental.uikit.enabled=true SONATYPE_HOST=S01 RELEASE_SIGNING_ENABLED=true GROUP=com.moriatsushi.insetsx -VERSION_NAME=0.1.0-alpha01 +VERSION_NAME=0.1.0-alpha02 POM_NAME=InsetsX POM_DESCRIPTION=WindowInsets utility for compose multiplatform From c88ab9246c277e61e533e2ee3783540b720b4556 Mon Sep 17 00:00:00 2001 From: Mori-Atsushi Date: Sat, 6 May 2023 15:58:56 +0900 Subject: [PATCH 2/2] Update readme --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 220b4d5..7a45bab 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## InsetsX [🚧 Work in progress 🚧] [![](https://img.shields.io/badge/Kotlin-Multiplatform-%237f52ff?logo=kotlin)](https://kotlinlang.org/docs/multiplatform.html) [![](https://img.shields.io/maven-central/v/com.moriatsushi.insetsx/insetsx)](https://mvnrepository.com/artifact/com.moriatsushi.insetsx/insetsx) -[![](https://img.shields.io/github/license/mori-atsushi/insetsx)](https://github.com/mori-atsushi/insetsx/blob/main/LISENCE) +[![](https://img.shields.io/github/license/mori-atsushi/insetsx)](https://github.com/mori-atsushi/insetsx/blob/main/LICENSE) @@ -35,10 +35,15 @@ Please note that the package name is different. ```kotlin import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.ui.Modifier import com.moriatsushi.insetsx.systemBars +import com.moriatsushi.insetsx.systemBarsPadding -val modifier = Modifier +val modifier1 = Modifier .windowInsetsPadding(WindowInsets.systemBars) + +val modifier2 = Modifier + .systemBarsPadding() ``` ## APIs @@ -50,5 +55,10 @@ WindowInsets.navigationBars|navigation bar|bottom of SafeArea WindowInsets.statusBars|status bar|top and horizontal of SafeArea WindowInsets.ime *1|software keyboard|software keyboard WindowInsets.safeDrawing *1|system bars + software keyboard|SafeArea + software keyboard +Modifier.systemBarsPadding()|status bar + navigation bar|SafeArea +Modifier.navigationBarsPadding()|navigation bar|bottom of SafeArea +Modifier.statusBarsPadding()|status bar|top and horizontal of SafeArea +Modifier.imePadding() *1|software keyboard|software keyboard +Modifier.safeDrawingPadding() *1|system bars + software keyboard|SafeArea + software keyboard *1 is experimental