From f922d8fcd6518df14927bfd64bd3e4b3de4f6155 Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Sat, 16 May 2026 07:59:30 -0700 Subject: [PATCH] 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) --- .../kotlin/chat/simplex/common/views/helpers/Section.kt | 8 +++++++- .../chat/simplex/common/views/usersettings/Appearance.kt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/Section.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/Section.kt index c454e55fd0..e35ae40ac3 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/Section.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/Section.kt @@ -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 diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/Appearance.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/Appearance.kt index 6ea828705a..caea7d3d5c 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/Appearance.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/Appearance.kt @@ -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 = {