Skip to content

Commit

Permalink
possible fix for overlay height
Browse files Browse the repository at this point in the history
  • Loading branch information
laurens-lamberts committed Feb 1, 2025
1 parent 11c5a4f commit 551c061
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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]

- possible fix for overlay height

## [0.1.15-3] - 2025-02-01

- added disableBlur option for overlay backdrop
Expand Down
7 changes: 4 additions & 3 deletions package/src/screens/OverlayBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ const OverlayBackdrop = ({
tileHeight?: number;
overlayProgress: SharedValue<number>;
}) => {
// TODO: refactor into hook, together with the one in Overlay.tsx
const {
overlayConfig: { overlayUnderNotch, dimmedOverlayBackdrop },
} = useContext(PopoutContext);
const safeAreaInsets = useSafeAreaInsets(); // TODO: make more generic
const safeAreaInsets = useSafeAreaInsets();
const insets = overlayUnderNotch
? { top: 0, bottom: 0, left: 0, right: 0 }
: safeAreaInsets;
Expand All @@ -56,6 +55,8 @@ const OverlayBackdrop = ({
const animatedStyle = useAnimatedStyle(() => {
return {
opacity: typeof opacity === 'number' ? opacity : opacity?.value,
width: screenWidth,
height: height.value,
};
});

Expand All @@ -76,7 +77,7 @@ const OverlayBackdrop = ({

return (
<Animated.View style={[viewStyle, animatedStyle]} pointerEvents="none">
<Canvas style={{ width: screenWidth, height: height.value }}>
<Canvas style={{ flex: 1 }}>
<Image image={image} fit="cover" width={screenWidth} height={height}>
{blurred && (
<Blur blur={dimmed ? 150 : 15} mode={dimmed ? 'decal' : 'clamp'}>
Expand Down

0 comments on commit 551c061

Please sign in to comment.