Make clock widget fonts lighter in compact layout

This commit is contained in:
MM20 2022-02-20 13:59:05 +01:00
parent b29f00cc79
commit b533e02ecf
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontWeight
import de.mm20.launcher2.preferences.Settings
@ -15,6 +16,8 @@ fun DigitalClock2(
) {
Text(
text = DateUtils.formatDateTime(LocalContext.current, time, DateUtils.FORMAT_SHOW_TIME),
style = MaterialTheme.typography.displaySmall
style = MaterialTheme.typography.displaySmall.copy(
fontWeight = FontWeight.Normal
)
)
}

View File

@ -11,6 +11,7 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.em
import de.mm20.launcher2.preferences.Settings.ClockWidgetSettings.ClockWidgetLayout
import java.text.SimpleDateFormat
@ -51,7 +52,9 @@ fun DatePart(
Text(
text = format.format(time),
lineHeight = 1.2.em,
style = MaterialTheme.typography.titleLarge,
style = MaterialTheme.typography.titleLarge.copy(
fontWeight = FontWeight.Medium
),
color = Color.White
)
}