mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Improve rendering of "All chats" regarding fontScale. (#984)
This commit is contained in:
committed by
Benoit Marty
parent
94c6223be2
commit
3c1f764bee
+8
@@ -52,3 +52,11 @@ fun Dp.toPx(): Float = with(LocalDensity.current) { toPx() }
|
||||
*/
|
||||
@Composable
|
||||
fun Dp.roundToPx(): Int = with(LocalDensity.current) { roundToPx() }
|
||||
|
||||
/**
|
||||
* Return the maximum value between the receiver value and the value with fonScale applied.
|
||||
*/
|
||||
@Composable
|
||||
fun Dp.scaleMax(): Dp = with(LocalDensity.current) {
|
||||
return this@scaleMax * fontScale.coerceAtMost(1f)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user