Skip to content

KamelImage fills up max sizeΒ #94

@zeroeightysix

Description

@zeroeightysix

Rather counterintuitively, and annoyingly, KamelImage without a Modifier to restrict its size will consume all space it can get due to this default modifier:

val onSuccess: @Composable (BoxScope.(Painter) -> Unit) = { painter ->
Image(
painter,
contentDescription,
Modifier.fillMaxSize(),
alignment,
contentScale,
alpha,
colorFilter
)

This leads to it being the case that if you include any image in an unbounded box that the entire UI just becomes that image. For our usecase, we have a very wide banner image that is supposed to fill up the parent's entire width but not the height. This default prevents that from happening πŸ™

Can't we make the inner Image have no modifier?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions