Repository: Automattic/pocket-casts-android
File: modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/Common.kt (Kotlin)

Code before:
        is Story.Ending -> Color(0xFFEE661C)
    }

internal data class EndOfYearMeasurements(
    val width: Dp,
    val height: Dp,
    val statusBarInsets: WindowInsets,
    val coverFontSize: TextUnit,
    val coverTextHeight: Dp,
    val closeButtonBottomEdge: Dp,
) {
    val scale = width / 393.dp
    val smallDeviceFactor = if (width > 380.dp) 1f else 0.85f
}

@Composable
internal fun ShareStoryButton(
    story: Story,
    controller: StoryCaptureController,
    onShare: (File) -> Unit,
    modifier: Modifier = Modifier,
) {
    val scope = rememberCoroutineScope()

    CircleIconButton(
        size = 48.dp,
        icon = painterResource(IR.drawable.ic_share),
        contentDescription = stringResource(LR.string.end_of_year_share_story),
        backgroundColor = Color.Black.copy(alpha = 0.44f),
        iconColor = Color.White,
        onClick = {
            scope.launch {
                val file = controller.capture(story)
                if (file != null) {
                    onShare(file)
                }
            }
        },
        modifier = modifier,
    )
}

@Composable
internal fun OutlinedEoyButton(
    text: String,
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
) {
    RowOutlinedButton(
        text = text,
        fontSize = 18.nonScaledSp,

Review comment (suggestion):
The design has the touch target at 34.dp but it feels very small on Android so I might ask the designers to try it at 48.dp first. It also matches the Material spec. https://m3.material.io/foundations/designing/structure#b421e522-35a6-47cd-bfc6-bf94cbacf7bb

<img width="109" height="134" alt="Image" src="https://github.com/user-attachments/assets/8141bb4e-50d2-4b3f-9400-21f7fdd11adf" />

Code after:
        is Story.Ending -> Color(0xFFEE661C)
    }

internal data class EndOfYearMeasurements(
    val width: Dp,
    val height: Dp,
    val statusBarInsets: WindowInsets,
    val coverFontSize: TextUnit,
    val coverTextHeight: Dp,
    val closeButtonBottomEdge: Dp,
) {
    val scale = width / 393.dp
    val smallDeviceFactor = if (width > 380.dp) 1f else 0.85f
}

@Composable
internal fun ShareStoryButton(
    story: Story,
    controller: StoryCaptureController,
    onShare: (File) -> Unit,
    modifier: Modifier = Modifier,
) {
    val scope = rememberCoroutineScope()

    CircleIconButton(
        size = 40.dp,
        icon = painterResource(IR.drawable.ic_share),
        contentDescription = stringResource(LR.string.end_of_year_share_story),
        backgroundColor = Color.Black.copy(alpha = 0.44f),
        iconColor = Color.White,
        onClick = {
            scope.launch {
                val file = controller.capture(story)
                if (file != null) {
                    onShare(file)
                }
            }
        },
        modifier = modifier.padding(4.dp),
    )
}

@Composable
internal fun OutlinedEoyButton(
    text: String,
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
) {
    RowOutlinedButton(
        text = text,
        fontSize = 18.nonScaledSp,