mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Load background color from theme colours and set it for top and bottom safe area to respect iOS style guide. (#1195)
This commit is contained in:
parent
34323042d5
commit
e0f5f47a15
@ -32,9 +32,7 @@ class SideMenuContentComponent extends Component {
|
|||||||
let styles = {
|
let styles = {
|
||||||
menu: {
|
menu: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: theme.backgroundColor,
|
backgroundColor: theme.backgroundColor
|
||||||
borderTopWidth: 1,
|
|
||||||
borderTopColor: theme.dividerColor,
|
|
||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
@ -54,6 +54,7 @@ const ShareExtension = require('react-native-share-extension').default;
|
|||||||
const ResourceFetcher = require('lib/services/ResourceFetcher');
|
const ResourceFetcher = require('lib/services/ResourceFetcher');
|
||||||
const SearchEngine = require('lib/services/SearchEngine');
|
const SearchEngine = require('lib/services/SearchEngine');
|
||||||
const WelcomeUtils = require('lib/WelcomeUtils');
|
const WelcomeUtils = require('lib/WelcomeUtils');
|
||||||
|
const { themeStyle } = require('lib/components/global-style.js');
|
||||||
|
|
||||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
|
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
|
||||||
const SyncTargetOneDrive = require('lib/SyncTargetOneDrive.js');
|
const SyncTargetOneDrive = require('lib/SyncTargetOneDrive.js');
|
||||||
@ -642,8 +643,9 @@ class AppComponent extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.props.appState != 'ready') return null;
|
if (this.props.appState != 'ready') return null;
|
||||||
|
const theme = themeStyle(this.props.theme);
|
||||||
|
|
||||||
const sideMenuContent = <SafeAreaView style={{flex:1}}><SideMenuContent/></SafeAreaView>;
|
const sideMenuContent = <SafeAreaView style={{flex:1, backgroundColor: theme.backgroundColor}}><SideMenuContent/></SafeAreaView>;
|
||||||
|
|
||||||
const appNavInit = {
|
const appNavInit = {
|
||||||
Welcome: { screen: WelcomeScreen },
|
Welcome: { screen: WelcomeScreen },
|
||||||
@ -671,7 +673,8 @@ class AppComponent extends React.Component {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MenuContext style={{ flex: 1 }}>
|
<MenuContext style={{ flex: 1 }}>
|
||||||
<SafeAreaView style={{flex:1}}>
|
<SafeAreaView style={{flex:0, backgroundColor: theme.raisedBackgroundColor}} />
|
||||||
|
<SafeAreaView style={{flex:1, backgroundColor: theme.backgroundColor}}>
|
||||||
<AppNav screens={appNavInit} />
|
<AppNav screens={appNavInit} />
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
<DropdownAlert ref={ref => this.dropdownAlert_ = ref} tapToCloseEnabled={true} />
|
<DropdownAlert ref={ref => this.dropdownAlert_ = ref} tapToCloseEnabled={true} />
|
||||||
@ -689,6 +692,7 @@ const mapStateToProps = (state) => {
|
|||||||
appState: state.appState,
|
appState: state.appState,
|
||||||
noteSelectionEnabled: state.noteSelectionEnabled,
|
noteSelectionEnabled: state.noteSelectionEnabled,
|
||||||
selectedFolderId: state.selectedFolderId,
|
selectedFolderId: state.selectedFolderId,
|
||||||
|
theme: state.settings.theme
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user