Skip to content

Commit

Permalink
Fix component instances (#1957)
Browse files Browse the repository at this point in the history
Fix mergeStyles() function to take values from base style by default,
and from override view style if set. Fix opacity value when rendering.
  • Loading branch information
rylin8 authored Jan 6, 2025
1 parent b0cb0dd commit 2a5f8ec
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 392 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ internal fun ContentDrawScope.squooshShapeRender(
// Blend mode
val blendMode = style.nodeStyle.blendMode.asComposeBlendMode()
val useBlendMode = style.nodeStyle.blendMode.useLayer()
val opacity = style.nodeStyle.opacity.takeIf { style.nodeStyle.hasMeterData() } ?: 1.0f
val opacity = style.nodeStyle.opacity.takeIf { style.nodeStyle.hasOpacity() } ?: 1.0f

// Always use saveLayer for opacity; no graphicsLayer since we're not in
// Compose.
Expand Down
Loading

0 comments on commit 2a5f8ec

Please sign in to comment.