Skip to content

Commit

Permalink
changed default of overlayBlur and other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laurens-lamberts committed Feb 2, 2025
1 parent 33792a1 commit 559db28
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- BREAKING CHANGE: changed default of overlayBlur to false
- BREAKING CHANGE: changed image to "contain" when there is no overlayBlur
- removed overlay background color when there is no blur
-

## [0.1.15-11] - 2025-02-02

- Another attempt to provide option disabling the blur
Expand Down
2 changes: 1 addition & 1 deletion package/src/components/PopoutRootView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const DEFAULT_OVERLAY_CONFIG: OverlayConfigType = {
overlayDimmedBackground: true,
overlayNotchInset: true,
overlayBorderRadius: BORDER_RADIUS_OVERLAY,
overlayBlur: true,
overlayBlur: false,
};

export const PopoutContext = createContext<PopoutContextType>({
Expand Down
9 changes: 7 additions & 2 deletions package/src/screens/OverlayBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const OverlayBackdrop = ({
top: 0,
width: screenWidth,
height: screenHeight - insets.top,
backgroundColor: '#000',
backgroundColor: overlayBlur ? '#000' : undefined,
};

const height = useDerivedValue(() => {
Expand Down Expand Up @@ -80,7 +80,12 @@ const OverlayBackdrop = ({
return (
<Animated.View style={[viewStyle, animatedStyle]} pointerEvents="none">
<Canvas style={[{ flex: 1 }, overlayImageStyle]}>
<Image image={image} fit="cover" width={screenWidth} height={height}>
<Image
image={image}
fit={overlayBlur ? 'cover' : 'contain'}
width={screenWidth}
height={height}
>
{blurred && overlayBlur && (
<Blur blur={dimmed ? 150 : 15} mode={dimmed ? 'decal' : 'clamp'}>
{dimmed && (
Expand Down

0 comments on commit 559db28

Please sign in to comment.