Skip to content

Commit

Permalink
feat: use official window size library
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 committed Aug 28, 2024
1 parent 9bb9cce commit 1bbb48a
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 355 deletions.
23 changes: 0 additions & 23 deletions .idea/runConfigurations/kmmutils__dokkaHtml_.xml

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ object Config {
"kotlin.contracts.ExperimentalContracts"
)
val compilerArgs = listOf(
"-Xbackend-threads=0", // parallel IR compilation
"-Xconsistent-data-class-copy-visibility",
)
val jvmCompilerArgs = buildList {
add("-Xjvm-default=all") // enable all jvm optimizations
add("-Xstring-concat=inline")
add("-Xbackend-threads=0") // parallel IR compilation
addAll(optIns.map { "-opt-in=$it" })
}

Expand Down
1 change: 1 addition & 0 deletions compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ kotlin {

api(libs.lifecycle.runtime)
api(libs.lifecycle.compose)
implementation(libs.compose.window.size)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.animationGraphics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shadow
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.LinkAnnotation
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontFamily
Expand Down Expand Up @@ -129,12 +130,10 @@ public fun String.shadow(
*/
public fun String.font(fontFamily: FontFamily): AnnotatedString = annotate(SpanStyle(fontFamily = fontFamily))

// TODO: Waiting for compose update

// public fun String.clickable(onClick: () -> Unit): AnnotatedString = annotate {
// pushLink(LinkAnnotation.Clickable("clickable") { onClick() })
// pushStyle(SpanStyle(textDecoration = TextDecoration.Underline))
// append(this@clickable)
// pop()
// pop()
// }
public fun String.clickable(onClick: () -> Unit): AnnotatedString = annotate {
pushLink(LinkAnnotation.Clickable("clickable") { onClick() })
pushStyle(SpanStyle(textDecoration = TextDecoration.Underline))
append(this@clickable)
pop()
pop()
}

This file was deleted.

Loading

0 comments on commit 1bbb48a

Please sign in to comment.