From 372bea8d5a3074b0369a67d5b63501e117605320 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Thu, 30 Jul 2026 21:16:41 +0200 Subject: [PATCH] Size the About logo to the card, not the card to the logo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At 72dp the launcher mark set the card's height on its own, towering over the two text lines beside it and over the 40dp category chips on the rows below. 56dp puts it at roughly the height of its own text, a step above the row chips — still the block's anchor, no longer its outlier. The mark is a vector, so this is purely a layout size; the 1.5x launcher-mask overscan now lives in a constant rather than a second hardcoded number, so it holds at whatever size the chip takes. Co-Authored-By: Claude Opus 5 --- .../calendula/ui/settings/SettingsScreen.kt | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt index 4478b73..f28dbff 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/settings/SettingsScreen.kt @@ -436,20 +436,36 @@ private fun AppVersionText() { * The app icon as a rounded chip: the off-white launcher mark over its slate * background colour, rendered oversized and clipped to fill the chip the way a * launcher mask would. + * + * Sized just past the two text lines beside it, so the card's height is set by + * its content rather than by the mark towering over it. That also keeps it a + * step above the 40dp category chips on the rows below — still the block's + * anchor, no longer its outlier. The mark is a vector, so the size is purely a + * layout choice; [MARK_OVERSCAN] holds the launcher-mask crop as it shrinks. */ @Composable private fun AppLogo() { Box( modifier = Modifier - .size(72.dp) - .clip(RoundedCornerShape(20.dp)) + .size(LOGO_SIZE) + .clip(RoundedCornerShape(16.dp)) .background(colorResource(R.color.ic_launcher_background)), contentAlignment = Alignment.Center, ) { Image( painter = painterResource(R.drawable.ic_launcher_foreground), contentDescription = stringResource(R.string.settings_about_logo_desc), - modifier = Modifier.requiredSize(108.dp), + modifier = Modifier.requiredSize(LOGO_SIZE * MARK_OVERSCAN), ) } } + +/** Roughly the height of the app name and author lines it sits beside. */ +private val LOGO_SIZE = 56.dp + +/** + * How far the mark overruns its chip. An adaptive icon's foreground is drawn + * with a wide safe margin, so at 1:1 the flower would sit small and lost inside + * the chip; the launcher crops the same way. + */ +private const val MARK_OVERSCAN = 1.5f