Skip to content

Commit

Permalink
Merge pull request BlueWallet#7497 from BlueWallet/c
Browse files Browse the repository at this point in the history
FIX; Camera safe area UI background was white.
  • Loading branch information
GladosBlueWallet authored Jan 14, 2025
2 parents ca5eff1 + a2db755 commit d6586cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
15 changes: 7 additions & 8 deletions components/CameraScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useRef } from 'react';
import { Animated, SafeAreaView, StatusBar, StyleSheet, TouchableOpacity, View } from 'react-native';
import { Animated, StyleSheet, TouchableOpacity, View } from 'react-native';
import { Camera, CameraApi, CameraType, Orientation } from 'react-native-camera-kit';
import loc from '../loc';
import { Icon } from '@rneui/base';
Expand Down Expand Up @@ -95,8 +95,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({

return (
<View style={styles.screen}>
<StatusBar hidden />
<SafeAreaView style={styles.topButtons}>
<View style={styles.topButtons}>
<TouchableOpacity style={styles.topButton} onPress={onSetTorch}>
<Animated.View style={[styles.topButtonImg, uiRotationStyle]}>
<Icon name={torchMode ? 'flashlight-on' : 'flashlight-off'} type="font-awesome-6" color="#ffffff" />
Expand Down Expand Up @@ -128,7 +127,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
</TouchableOpacity>
)}
</View>
</SafeAreaView>
</View>

<View style={styles.cameraContainer}>
<Camera
Expand All @@ -149,7 +148,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
/>
</View>

<SafeAreaView style={styles.bottomButtons}>
<View style={styles.bottomButtons}>
<TouchableOpacity onPress={onCancelButtonPress}>
<Animated.Text style={[styles.backTextStyle, uiRotationStyle]}>{loc._.cancel}</Animated.Text>
</TouchableOpacity>
Expand All @@ -158,7 +157,7 @@ const CameraScreen: React.FC<CameraScreenProps> = ({
<Icon name="cameraswitch" type="font-awesome-6" color="#ffffff" />
</Animated.View>
</TouchableOpacity>
</SafeAreaView>
</View>
</View>
);
};
Expand All @@ -171,7 +170,7 @@ const styles = StyleSheet.create({
backgroundColor: '#000000',
},
topButtons: {
margin: 10,
padding: 10,
zIndex: 10,
flexDirection: 'row',
justifyContent: 'space-between',
Expand All @@ -198,7 +197,7 @@ const styles = StyleSheet.create({
height: '100%',
},
bottomButtons: {
margin: 10,
padding: 10,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
Expand Down
1 change: 1 addition & 0 deletions components/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const BlueDarkTheme: Theme = {
customHeader: '#000000',
brandingColor: '#000000',
borderTopColor: '#9aa0aa',
background: '#000000',
foregroundColor: '#ffffff',
buttonDisabledBackgroundColor: '#3A3A3C',
buttonBackgroundColor: '#3A3A3C',
Expand Down
6 changes: 3 additions & 3 deletions screen/send/ScanQRCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ const ScanQRCode = () => {
const render = isLoading ? (
<BlueLoading />
) : (
<SafeArea>
<View>
{!cameraStatusGranted ? (
<View style={[styles.openSettingsContainer, stylesHook.openSettingsContainer]}>
<BlueText>{loc.send.permission_camera_message}</BlueText>
Expand Down Expand Up @@ -342,10 +342,10 @@ const ScanQRCode = () => {
style={styles.backdoorButton}
onPress={handleInvisibleBackdoorPress}
/>
</SafeArea>
</View>
);

return <View style={styles.root}>{render}</View>;
return <SafeArea style={styles.root}>{render}</SafeArea>;
};

export default ScanQRCode;

0 comments on commit d6586cb

Please sign in to comment.