mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Add extra padding for informative view.
This commit is contained in:
committed by
Benoit Marty
parent
909e4518c0
commit
8e5d53ba69
+8
@@ -51,3 +51,11 @@ fun TimelineItem.Event.toExtraPadding(): ExtraPadding {
|
|||||||
// A space and a few unbreakable spaces
|
// A space and a few unbreakable spaces
|
||||||
return ExtraPadding(" " + "\u00A0".repeat(strLen))
|
return ExtraPadding(" " + "\u00A0".repeat(strLen))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun ExtraPadding.strBigger(): String {
|
||||||
|
return if (str.isEmpty()) {
|
||||||
|
str
|
||||||
|
} else {
|
||||||
|
str + "\u00A0\u00A0\u00A0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+2
-1
@@ -59,7 +59,8 @@ fun TimelineItemInformativeView(
|
|||||||
fontStyle = FontStyle.Italic,
|
fontStyle = FontStyle.Italic,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = MaterialTheme.colorScheme.secondary,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
text = text + extraPadding.str
|
// Since the font size is smaller, add more space to extra padding, to not overlap with the timestamp
|
||||||
|
text = text + extraPadding.strBigger()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user