Appearance + Customize theme: bring loose items into cards, drop spurious spacer

Four small fixes on the same theme-related screens:

- Move "Customize theme" SectionItemView INSIDE the THEMES SectionView
  in AppearanceView so it sits in the same card as Color mode / Dark
  mode colors with an auto-divider above it.
- Wrap WallpaperPresetSelector (theme slots + chat preview) and the
  conditional Remove-image button in CustomizeThemeView with a
  SectionView so they read as a card, matching the Appearance themes
  card pattern. Add a SectionDividerSpaced after.
- Drop SectionSpacer() that sat between the Wallpaper tint row and the
  Sent message row inside WallpaperSetupView — auto-divider on the
  Wallpaper tint SectionItemView already provides separation; the
  30dp spacer rendered as extra empty padding inside the card.
- Wrap the Reset colors action in a single-item SectionView so it
  reads as its own card, matching the export/import card below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
another-simple-pixel
2026-05-16 09:14:08 -07:00
parent 753b366b08
commit 4137234086
@@ -587,23 +587,23 @@ object AppearanceScope {
}
saveThemeToDatabase(null)
}
}
SectionItemView(click = {
val user = themeUserDestination.value
if (user == null) {
ModalManager.start.showModal {
val importWallpaperLauncher = rememberFileChooserLauncher(true) { to: URI? ->
if (to != null) onImport(to)
SectionItemView(click = {
val user = themeUserDestination.value
if (user == null) {
ModalManager.start.showModal {
val importWallpaperLauncher = rememberFileChooserLauncher(true) { to: URI? ->
if (to != null) onImport(to)
}
CustomizeThemeView { onChooseType(it, importWallpaperLauncher) }
}
} else {
ModalManager.start.showModalCloseable { close ->
UserWallpaperEditorModal(chatModel.remoteHostId(), user.first, close)
}
CustomizeThemeView { onChooseType(it, importWallpaperLauncher) }
}
} else {
ModalManager.start.showModalCloseable { close ->
UserWallpaperEditorModal(chatModel.remoteHostId(), user.first, close)
}
}) {
Text(stringResource(MR.strings.customize_theme_title))
}
}) {
Text(stringResource(MR.strings.customize_theme_title))
}
}
@@ -629,31 +629,33 @@ object AppearanceScope {
)
}
WallpaperPresetSelector(
selectedWallpaper = wallpaperType,
baseTheme = currentTheme.base,
currentColors = { type ->
ThemeManager.currentColors(type, null, null, appPrefs.themeOverrides.get())
},
onChooseType = onChooseType
)
SectionView {
WallpaperPresetSelector(
selectedWallpaper = wallpaperType,
baseTheme = currentTheme.base,
currentColors = { type ->
ThemeManager.currentColors(type, null, null, appPrefs.themeOverrides.get())
},
onChooseType = onChooseType
)
val type = MaterialTheme.wallpaper.type
if (type is WallpaperType.Image) {
SectionItemView(disabled = chatModel.remoteHostId != null, click = {
val defaultActiveTheme = ThemeManager.defaultActiveTheme(appPrefs.themeOverrides.get())
ThemeManager.saveAndApplyWallpaper(baseTheme, null)
ThemeManager.removeTheme(defaultActiveTheme?.themeId)
removeWallpaperFile(type.filename)
saveThemeToDatabase(null)
}) {
Text(
stringResource(MR.strings.theme_remove_image),
color = if (chatModel.remoteHostId == null) MaterialTheme.colors.primary else MaterialTheme.colors.secondary
)
val type = MaterialTheme.wallpaper.type
if (type is WallpaperType.Image) {
SectionItemView(disabled = chatModel.remoteHostId != null, click = {
val defaultActiveTheme = ThemeManager.defaultActiveTheme(appPrefs.themeOverrides.get())
ThemeManager.saveAndApplyWallpaper(baseTheme, null)
ThemeManager.removeTheme(defaultActiveTheme?.themeId)
removeWallpaperFile(type.filename)
saveThemeToDatabase(null)
}) {
Text(
stringResource(MR.strings.theme_remove_image),
color = if (chatModel.remoteHostId == null) MaterialTheme.colors.primary else MaterialTheme.colors.secondary
)
}
}
SectionSpacer()
}
SectionDividerSpaced()
SectionView(stringResource(MR.strings.settings_section_title_chat_colors).uppercase()) {
WallpaperSetupView(
@@ -684,11 +686,13 @@ object AppearanceScope {
val currentOverrides = remember(currentTheme) { ThemeManager.defaultActiveTheme(appPrefs.themeOverrides.get()) }
val canResetColors = currentTheme.base.hasChangedAnyColor(currentOverrides)
if (canResetColors) {
SectionItemView({
ThemeManager.resetAllThemeColors()
saveThemeToDatabase(null)
}) {
Text(generalGetString(MR.strings.reset_color), color = colors.primary)
SectionView {
SectionItemView({
ThemeManager.resetAllThemeColors()
saveThemeToDatabase(null)
}) {
Text(generalGetString(MR.strings.reset_color), color = colors.primary)
}
}
SectionSpacer()
}
@@ -1238,7 +1242,6 @@ fun WallpaperSetupView(
Text(title)
Icon(painterResource(MR.images.ic_circle_filled), title, tint = wallpaperTintColor)
}
SectionSpacer()
}
SectionItemViewSpaceBetween({ editColor(ThemeColor.SENT_MESSAGE) }) {