[Compound] Improve Bloom (#1272)
* Improve Bloom: - Simplify bloom blurred image. - Display very subtle bloom for avatars with soft colors. * Improve caching and performance --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
5ddaf0547f
commit
07d63298be
58 changed files with 160 additions and 124 deletions
|
|
@ -158,13 +158,19 @@ private fun DefaultRoomListTopBar(
|
|||
.nestedScroll(scrollBehavior.nestedScrollConnection)
|
||||
.avatarBloom(
|
||||
avatarData = avatarData,
|
||||
background = ElementTheme.materialColors.background,
|
||||
background = if (ElementTheme.isLightTheme) {
|
||||
// Workaround to display a very subtle bloom for avatars with very soft colors
|
||||
Color(0xFFF9F9F9)
|
||||
} else {
|
||||
ElementTheme.materialColors.background
|
||||
},
|
||||
blurSize = DpSize(avatarBloomSize, avatarBloomSize),
|
||||
offset = DpOffset(24.dp, 24.dp + statusBarPadding),
|
||||
clipToSize = if (appBarHeight > 0) DpSize(
|
||||
avatarBloomSize,
|
||||
appBarHeight.toDp()
|
||||
) else DpSize.Unspecified,
|
||||
bottomSoftEdgeColor = ElementTheme.materialColors.background,
|
||||
bottomSoftEdgeAlpha = 1f - collapsedFraction,
|
||||
alpha = if (areSearchResultsDisplayed) 0f else 1f,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue