dc09-sensors2 #5

Merged
nm17 merged 28 commits from dc09-sensors2 into master 2023-06-18 13:15:53 +03:00
3 changed files with 13 additions and 1 deletions
Showing only changes of commit 4c3584d63c - Show all commits

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

Binary file not shown.