Blur effect on home screen (iOS 26) (#9935)

This commit is contained in:
Samuel Newman
2026-02-26 15:00:12 +00:00
committed by GitHub
parent 9b24d75c9c
commit 65c4b7833d
6 changed files with 49 additions and 14 deletions
+7 -4
View File
@@ -1,14 +1,17 @@
import {useWindowDimensions} from 'react-native'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
import {useBreakpoints} from '#/alf'
import {IS_LIQUID_GLASS} from '#/env'
export function useHeaderOffset() {
const {isDesktop, isTablet} = useWebMediaQueries()
const {gtMobile} = useBreakpoints()
const {fontScale} = useWindowDimensions()
if (isDesktop || isTablet) {
const insets = useSafeAreaInsets()
if (gtMobile) {
return 0
}
const navBarHeight = 52
const navBarHeight = 52 + (IS_LIQUID_GLASS ? insets.top : 0)
const tabBarPad = 10 + 10 + 3 // padding + border
const normalLineHeight = 20 // matches tab bar
const tabBarText = normalLineHeight * fontScale