Refactor some Typography members.

This commit is contained in:
Thomas Andres Gomez 2025-05-06 19:52:54 +02:00
parent 31616050f6
commit 11d7a3d5d7

View file

@ -18,7 +18,6 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.pixelized.desktop.lwa.ui.theme.color.LwaColors import com.pixelized.desktop.lwa.ui.theme.color.LwaColors
import com.pixelized.desktop.lwa.ui.theme.typography.LwaTypography.Settings import com.pixelized.desktop.lwa.ui.theme.typography.LwaTypography.Settings
import com.pixelized.shared.lwa.model.inventory.Inventory
import lwacharactersheet.composeapp.generated.resources.Res import lwacharactersheet.composeapp.generated.resources.Res
import lwacharactersheet.composeapp.generated.resources.consola_mono_bold import lwacharactersheet.composeapp.generated.resources.consola_mono_bold
import lwacharactersheet.composeapp.generated.resources.consola_mono_book import lwacharactersheet.composeapp.generated.resources.consola_mono_book
@ -73,16 +72,14 @@ fun lwaTypography(
base: Typography = Typography(), base: Typography = Typography(),
colors: LwaColors, colors: LwaColors,
): LwaTypography { ): LwaTypography {
val jack = ConsolaFontFamily() val consolaFontFamily = ConsolaFontFamily()
return remember( return remember(consolaFontFamily) {
jack,
) {
LwaTypography( LwaTypography(
base = base, base = base,
chat = LwaTypography.Chat( chat = LwaTypography.Chat(
timestamp = base.body1.copy( timestamp = base.body1.copy(
fontFamily = jack, fontFamily = consolaFontFamily,
fontWeight = FontWeight.Normal, fontWeight = FontWeight.Normal,
fontSize = 12.sp, fontSize = 12.sp,
lineHeight = 16.sp, lineHeight = 16.sp,