Шрифт Iosevka для значений датчиков

This commit is contained in:
DarkCat09 2023-06-07 21:42:26 +04:00
parent 9739d1cdfe
commit 4c3584d63c
3 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.ui
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import ru.nm17.narodmon.R
val iosevkaFamily = FontFamily(
Font(R.font.iosevka, FontWeight.Medium)
)

View file

@ -44,6 +44,7 @@ import ru.nm17.narodmon.R
import ru.nm17.narodmon.db.entities.SensorType
import ru.nm17.narodmon.ui.elements.GenericNavScaffold
import ru.nm17.narodmon.ui.elements.TileMap
import ru.nm17.narodmon.ui.iosevkaFamily
data class Sensor(
// TODO: Вынести в отдельный класс, и явно не в директорию `ui`
@ -322,7 +323,8 @@ fun SensorItem(sensor: Sensor) {
) {
Text(
text = "${sensor.value} ${sensor.unit}",
fontFamily = FontFamily.Monospace,
fontFamily = iosevkaFamily,
fontWeight = FontWeight.Medium,
fontSize = 14.sp,
modifier = Modifier.padding(horizontal = 3.dp, vertical = 1.dp)
)

Binary file not shown.