Center story viewport on tall devices.

This commit is contained in:
Alex Hart
2022-11-01 13:17:43 -03:00
committed by Cody Henthorne
parent 77beeda62a
commit 84f0548966
2 changed files with 29 additions and 3 deletions

View File

@@ -12,4 +12,16 @@ val Float.dp: Float get() = DimensionUnit.DP.toPixels(this)
* Converts the given Int DP value into Pixels
*/
@get:Px
val Int.dp: Int get() = this.toFloat().dp.toInt()
val Int.dp: Int get() = this.toFloat().dp.toInt()
/**
* Converts the given Float SP value into Pixels.
*/
@get:Px
val Float.sp: Float get() = DimensionUnit.SP.toPixels(this)
/**
* Converts the given Int SP value into Pixels
*/
@get:Px
val Int.sp: Int get() = this.toFloat().sp.toInt()