From e30b982bac257523ed0638da86d57d4c7549a572 Mon Sep 17 00:00:00 2001 From: Daniel Kao Date: Fri, 13 Dec 2024 23:39:16 +0800 Subject: [PATCH] fix: #447 use sp instead --- .../plateaukao/einkbro/view/compose/BrowseHistoryList.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/plateaukao/einkbro/view/compose/BrowseHistoryList.kt b/app/src/main/java/info/plateaukao/einkbro/view/compose/BrowseHistoryList.kt index f54ca625..e3ba7727 100644 --- a/app/src/main/java/info/plateaukao/einkbro/view/compose/BrowseHistoryList.kt +++ b/app/src/main/java/info/plateaukao/einkbro/view/compose/BrowseHistoryList.kt @@ -42,7 +42,6 @@ import info.plateaukao.einkbro.R import info.plateaukao.einkbro.database.BookmarkManager import info.plateaukao.einkbro.database.Record import info.plateaukao.einkbro.database.RecordType -import info.plateaukao.einkbro.unit.ViewUnit import info.plateaukao.einkbro.view.dialog.compose.toScreenPoint import java.text.SimpleDateFormat import java.util.Locale @@ -141,7 +140,7 @@ private fun RecordItem( AndroidView( factory = { context -> TextView(context).apply { - textSize = ViewUnit.dpToPixel(11).toFloat() + textSize = 16.sp.value.toFloat() maxLines = 1 ellipsize = TextUtils.TruncateAt.MIDDLE } @@ -158,7 +157,7 @@ private fun RecordItem( .align(Alignment.Top), factory = { context -> TextView(context).apply { - textSize = ViewUnit.dpToPixel(8).toFloat() + textSize = 12.sp.value.toFloat() textAlignment = TextView.TEXT_ALIGNMENT_CENTER maxLines = 1 ellipsize = TextUtils.TruncateAt.MIDDLE