Skip to content

Commit

Permalink
Fix title's constraint layout params (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
mars885 authored Aug 15, 2024
1 parent f39fc04 commit 3ec4ff7
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ fun GamesCategoryPreview(
Title(
title = title,
modifier = Modifier.constrainAs(titleRef) {
val endAnchor = when {
isProgressBarVisible -> progressBarRef.start
isMoreButtonVisible -> moreBtnRef.start
else -> parent.end
}

width = Dimension.fillToConstraints
top.linkTo(parent.top, titleRefMargin)
start.linkTo(parent.start, titleRefMargin)
end.linkTo(progressBarRef.start, titleRefMargin)
end.linkTo(endAnchor, titleRefMargin)
},
)

Expand Down

0 comments on commit 3ec4ff7

Please sign in to comment.