mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-07 19:14:12 +08:00
refactor: make softWrap follow singleLine and change overflow default to TextOverflow.Ellipsis in Text
This commit is contained in:
@@ -44,11 +44,11 @@ fun Text(
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
style: TextStyle = Text.style,
|
||||
overflow: TextOverflow = TextOverflow.Clip,
|
||||
softWrap: Boolean = true,
|
||||
singleLine: Boolean = false,
|
||||
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
||||
minLines: Int = 1,
|
||||
overflow: TextOverflow = TextOverflow.Ellipsis,
|
||||
softWrap: Boolean = !singleLine || maxLines > 1,
|
||||
onTextLayout: (TextLayoutResult) -> Unit = {}
|
||||
) {
|
||||
Text(
|
||||
@@ -71,11 +71,11 @@ fun Text(
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = Color.Unspecified,
|
||||
style: TextStyle = Text.style,
|
||||
overflow: TextOverflow = TextOverflow.Clip,
|
||||
softWrap: Boolean = true,
|
||||
singleLine: Boolean = false,
|
||||
maxLines: Int = if (singleLine) 1 else Int.MAX_VALUE,
|
||||
minLines: Int = 1,
|
||||
overflow: TextOverflow = TextOverflow.Ellipsis,
|
||||
softWrap: Boolean = !singleLine || maxLines > 1,
|
||||
inlineContent: Map<String, InlineTextContent> = mapOf(),
|
||||
onTextLayout: (TextLayoutResult) -> Unit = {}
|
||||
) {
|
||||
|
Reference in New Issue
Block a user