Media : timeline file adjustment
This commit is contained in:
parent
e3457fb594
commit
4b704fe02c
2 changed files with 12 additions and 3 deletions
|
|
@ -20,8 +20,9 @@ import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.Attachment
|
import androidx.compose.material.icons.outlined.Attachment
|
||||||
|
|
@ -61,10 +62,13 @@ fun TimelineItemFileView(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Outlined.Attachment,
|
imageVector = Icons.Outlined.Attachment,
|
||||||
contentDescription = "OpenFile",
|
contentDescription = "OpenFile",
|
||||||
modifier = Modifier.size(16.dp).rotate(-45f),
|
modifier = Modifier
|
||||||
|
.size(16.dp)
|
||||||
|
.rotate(-45f),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Column(modifier = Modifier.padding(horizontal = 8.dp),) {
|
Spacer(Modifier.width(8.dp))
|
||||||
|
Column {
|
||||||
Text(
|
Text(
|
||||||
text = content.body,
|
text = content.body,
|
||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
|
|
@ -74,6 +78,7 @@ fun TimelineItemFileView(
|
||||||
Text(
|
Text(
|
||||||
text = content.fileExtensionAndSize,
|
text = content.fileExtensionAndSize,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = MaterialTheme.colorScheme.secondary,
|
||||||
|
fontSize = 12.sp,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ fun Text(
|
||||||
lineHeight: TextUnit = TextUnit.Unspecified,
|
lineHeight: TextUnit = TextUnit.Unspecified,
|
||||||
overflow: TextOverflow = TextOverflow.Clip,
|
overflow: TextOverflow = TextOverflow.Clip,
|
||||||
softWrap: Boolean = true,
|
softWrap: Boolean = true,
|
||||||
|
minLines: Int = 1,
|
||||||
maxLines: Int = Int.MAX_VALUE,
|
maxLines: Int = Int.MAX_VALUE,
|
||||||
onTextLayout: (TextLayoutResult) -> Unit = {},
|
onTextLayout: (TextLayoutResult) -> Unit = {},
|
||||||
style: TextStyle = LocalTextStyle.current
|
style: TextStyle = LocalTextStyle.current
|
||||||
|
|
@ -84,6 +85,7 @@ fun Text(
|
||||||
lineHeight = lineHeight,
|
lineHeight = lineHeight,
|
||||||
overflow = overflow,
|
overflow = overflow,
|
||||||
softWrap = softWrap,
|
softWrap = softWrap,
|
||||||
|
minLines = minLines,
|
||||||
maxLines = maxLines,
|
maxLines = maxLines,
|
||||||
onTextLayout = onTextLayout,
|
onTextLayout = onTextLayout,
|
||||||
style = style,
|
style = style,
|
||||||
|
|
@ -105,6 +107,7 @@ fun Text(
|
||||||
lineHeight: TextUnit = TextUnit.Unspecified,
|
lineHeight: TextUnit = TextUnit.Unspecified,
|
||||||
overflow: TextOverflow = TextOverflow.Clip,
|
overflow: TextOverflow = TextOverflow.Clip,
|
||||||
softWrap: Boolean = true,
|
softWrap: Boolean = true,
|
||||||
|
minLines: Int = 1,
|
||||||
maxLines: Int = Int.MAX_VALUE,
|
maxLines: Int = Int.MAX_VALUE,
|
||||||
inlineContent: ImmutableMap<String, InlineTextContent> = persistentMapOf(),
|
inlineContent: ImmutableMap<String, InlineTextContent> = persistentMapOf(),
|
||||||
onTextLayout: (TextLayoutResult) -> Unit = {},
|
onTextLayout: (TextLayoutResult) -> Unit = {},
|
||||||
|
|
@ -124,6 +127,7 @@ fun Text(
|
||||||
lineHeight = lineHeight,
|
lineHeight = lineHeight,
|
||||||
overflow = overflow,
|
overflow = overflow,
|
||||||
softWrap = softWrap,
|
softWrap = softWrap,
|
||||||
|
minLines = minLines,
|
||||||
maxLines = maxLines,
|
maxLines = maxLines,
|
||||||
inlineContent = inlineContent,
|
inlineContent = inlineContent,
|
||||||
onTextLayout = onTextLayout,
|
onTextLayout = onTextLayout,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue