@@ -237,61 +237,91 @@ internal fun SettingsScreen(
237237 )
238238 }
239239
240- // ── Typography ──────────────────────────────────────────────────────
240+ // ── App Theme ───────────────────────────────────────────────────────
241+ var themeExpanded by remember { mutableStateOf(false ) }
242+
241243 ExpressiveCard {
242- CardHeader (title = stringResource(R .string.typography))
243-
244- ExpressiveSegmentedButtonRow (
245- items = listOf (" NDot" , " NType" ),
246- selectedItem = selectedFont,
247- onItemSelection = { viewModel.setSelectedFont(it) },
248- labelProvider = { if (it == " NDot" ) stringResource(R .string.font_ndot) else stringResource(R .string.font_ntype) },
249- modifier = Modifier .fillMaxWidth()
250- )
244+ Row (
245+ modifier = Modifier
246+ .fillMaxWidth()
247+ .clickable { themeExpanded = ! themeExpanded },
248+ verticalAlignment = Alignment .CenterVertically ,
249+ horizontalArrangement = Arrangement .SpaceBetween
250+ ) {
251+ Row (verticalAlignment = Alignment .CenterVertically , horizontalArrangement = Arrangement .spacedBy(12 .dp)) {
252+ Icon (Icons .Default .Palette , contentDescription = null , tint = MaterialTheme .colorScheme.primary)
253+ Text (
254+ text = stringResource(R .string.app_theme),
255+ style = MaterialTheme .typography.titleMedium,
256+ fontWeight = FontWeight .Bold
257+ )
258+ }
259+ Icon (
260+ imageVector = if (themeExpanded) Icons .Default .ExpandLess else Icons .Default .ExpandMore ,
261+ contentDescription = null ,
262+ tint = MaterialTheme .colorScheme.primary.copy(alpha = 0.5f )
263+ )
264+ }
251265
252- Spacer (modifier = Modifier .height(8 .dp))
253- BodyText (
254- text = stringResource(R .string.typography_help_text),
255- size = 12 .sp
256- )
257- }
266+ AnimatedVisibility (visible = themeExpanded) {
267+ Column (modifier = Modifier .padding(top = 16 .dp), verticalArrangement = Arrangement .spacedBy(16 .dp)) {
268+ // Typography
269+ Text (
270+ text = stringResource(R .string.typography),
271+ style = MaterialTheme .typography.labelLarge,
272+ color = MaterialTheme .colorScheme.primary
273+ )
274+
275+ ExpressiveSegmentedButtonRow (
276+ items = listOf (" NDot" , " NType" ),
277+ selectedItem = selectedFont,
278+ onItemSelection = { viewModel.setSelectedFont(it) },
279+ labelProvider = { if (it == " NDot" ) stringResource(R .string.font_ndot) else stringResource(R .string.font_ntype) },
280+ modifier = Modifier .fillMaxWidth()
281+ )
258282
259- // ── App Theme ───────────────────────────────────────────────────────
260- ExpressiveCard {
261- CardHeader (title = stringResource(R .string.app_theme))
262-
263- val themeOptions = listOf (
264- Triple (" Default" , stringResource(R .string.theme_normal), Icons .Default .BrightnessAuto ),
265- Triple (" Liquorice Black" , stringResource(R .string.theme_liquorice), Icons .Default .DarkMode ),
266- Triple (" Nothing" , stringResource(R .string.theme_nothing), Icons .Default .Settings ),
267- Triple (" Material You" , stringResource(R .string.theme_material_you), Icons .Default .Palette ),
268- Triple (" Music" , stringResource(R .string.theme_music), Icons .Default .MusicNote )
269- )
283+ BodyText (
284+ text = stringResource(R .string.typography_help_text),
285+ size = 12 .sp
286+ )
270287
271- FlowRow (
272- modifier = Modifier .fillMaxWidth(),
273- maxItemsInEachRow = 2 ,
274- horizontalArrangement = Arrangement .spacedBy(8 .dp),
275- verticalArrangement = Arrangement .spacedBy(8 .dp)
276- ) {
277- themeOptions.forEach { (key, label, icon) ->
278- val isSelected = selectedTheme == key
279- OptionTile (
280- label = label,
281- icon = icon,
282- isSelected = isSelected,
283- onClick = {
284- if (key == " Music" && ! viewModel.isNotificationAccessGranted()) {
285- val message = localContext.getString(R .string.music_theme_notification_access)
286- Toast .makeText(localContext, message, Toast .LENGTH_LONG ).show()
287- localContext.startActivity(android.content.Intent (" android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS" ))
288- } else {
289- viewModel.setSelectedTheme(key)
290- }
291- },
292- modifier = Modifier .height(64 .dp),
293- maxLines = 1
288+ Spacer (modifier = Modifier .height(8 .dp))
289+
290+ // Theme Options
291+ val themeOptions = listOf (
292+ Triple (" Default" , stringResource(R .string.theme_normal), Icons .Default .BrightnessAuto ),
293+ Triple (" Liquorice Black" , stringResource(R .string.theme_liquorice), Icons .Default .DarkMode ),
294+ Triple (" Nothing" , stringResource(R .string.theme_nothing), Icons .Default .Settings ),
295+ Triple (" Material You" , stringResource(R .string.theme_material_you), Icons .Default .Palette ),
296+ Triple (" Music" , stringResource(R .string.theme_music), Icons .Default .MusicNote )
294297 )
298+
299+ FlowRow (
300+ modifier = Modifier .fillMaxWidth(),
301+ maxItemsInEachRow = 2 ,
302+ horizontalArrangement = Arrangement .spacedBy(8 .dp),
303+ verticalArrangement = Arrangement .spacedBy(8 .dp)
304+ ) {
305+ themeOptions.forEach { (key, label, icon) ->
306+ val isSelected = selectedTheme == key
307+ OptionTile (
308+ label = label,
309+ icon = icon,
310+ isSelected = isSelected,
311+ onClick = {
312+ if (key == " Music" && ! viewModel.isNotificationAccessGranted()) {
313+ val message = localContext.getString(R .string.music_theme_notification_access)
314+ Toast .makeText(localContext, message, Toast .LENGTH_LONG ).show()
315+ localContext.startActivity(android.content.Intent (" android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS" ))
316+ } else {
317+ viewModel.setSelectedTheme(key)
318+ }
319+ },
320+ modifier = Modifier .height(64 .dp),
321+ maxLines = 1
322+ )
323+ }
324+ }
295325 }
296326 }
297327 }
0 commit comments