Section: repurpose SectionDivider() as explicit 2dp canvas-color line; use in Appearance themes card

SectionDivider() composable had 0 callsites and used Material Divider
with horizontal inset (unused legacy). Repurposed to draw a 2dp
canvas-color Box matching the auto-divider style used by
SectionItemView, gated by LocalInSectionCard so it no-ops outside a
section card.

Use it in Appearance themes card between WallpaperPresetSelector
(custom composable, not a SectionItemView, so no auto-divider) and the
following content (Remove image / Color mode / Dark mode), providing
the visual separator the user expects between the theme grid and the
rows below it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
another-simple-pixel
2026-05-16 07:59:30 -07:00
parent 10125572f2
commit f922d8fcd6
2 changed files with 8 additions and 1 deletions
@@ -311,9 +311,15 @@ fun SectionCustomFooter(padding: PaddingValues = PaddingValues(start = DEFAULT_P
}
}
// Explicit 2dp canvas-color divider for inserting between non-SectionItemView
// composables inside a SectionView card (e.g., between a custom block and a
// SectionItemView). Auto-divider on SectionItemView handles the row-to-row
// case; this one covers manual placement around mixed content. No-op outside
// a SectionView card.
@Composable
fun SectionDivider() {
Divider(Modifier.padding(horizontal = 8.dp))
if (!LocalInSectionCard.current) return
Box(Modifier.fillMaxWidth().height(2.dp).background(canvasColorForCurrentTheme()))
}
@Composable
@@ -536,6 +536,7 @@ object AppearanceScope {
},
onChooseType = { onChooseType(it, importWallpaperLauncher) },
)
SectionDivider()
val type = MaterialTheme.wallpaper.type
if (type is WallpaperType.Image && (themeUserDestination.value == null || perUserTheme.value.wallpaper?.imageFile != null)) {
SectionItemView(disabled = chatModel.remoteHostId != null && themeUserDestination.value != null, click = {