Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compose/ui/ui-text/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ androidXMultiplatform {

// TODO: Align it with AOSP or make explicit
configureEach {
languageSettings.optIn("androidx.compose.ui.InternalComposeUiApi")
languageSettings.optIn("androidx.compose.ui.text.ExperimentalTextApi")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package androidx.compose.ui.text.style

import androidx.compose.ui.InternalComposeUiApi
import androidx.compose.ui.text.PlatformParagraphStyle
import androidx.compose.ui.text.internal.checkPrecondition
import kotlin.jvm.JvmInline
Expand Down Expand Up @@ -206,11 +207,13 @@ class LineHeightStyle(val alignment: Alignment, val trim: Trim, val mode: Mode)
val None = Trim(0)
}

internal fun isTrimFirstLineTop(): Boolean {
@InternalComposeUiApi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Okay to merge together with #3126.

Better to not merge separatelly

fun isTrimFirstLineTop(): Boolean {
return value and FlagTrimTop > 0
}

internal fun isTrimLastLineBottom(): Boolean {
@InternalComposeUiApi
fun isTrimLastLineBottom(): Boolean {
return value and FlagTrimBottom > 0
}
}
Expand All @@ -222,7 +225,7 @@ class LineHeightStyle(val alignment: Alignment, val trim: Trim, val mode: Mode)
* 0f (inclusive) and 1f (inclusive).
*/
@kotlin.jvm.JvmInline
value class Alignment constructor(internal val topRatio: Float) {
value class Alignment constructor(@property:InternalComposeUiApi val topRatio: Float) {

init {
checkPrecondition(topRatio in 0f..1f || topRatio == -1f) {
Expand Down
Loading