Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ui padding issues on starter #851

Merged
merged 1 commit into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"id": "PauodvCU2r.RNVanillaMobile"
}
}
}
}
6 changes: 3 additions & 3 deletions packages/template-starter/src/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const hasHorizontalMenu = !isFactorMobile && !isFactorDesktop && !hasMobi
export const hasFullScreenMenu = hasMobileWebUI;
export const hasVerticalMenu = !hasHorizontalMenu && !hasFullScreenMenu;
export const hasWebFocusableUI = isWebBased && isFactorTv;
const hasModalPadding: boolean = (isPlatformMacos && !isWebBased) ? true : false;
const isNativeMacos: boolean = (isPlatformMacos && !isWebBased) ? true : false;

// Disable yellow warnings UI - console.disableYellowBox replacement with setImmediate workaround
// if (!global.setImmediate) {
Expand Down Expand Up @@ -72,7 +72,7 @@ const staticThemes = {

const createStyleSheet = currentTheme => StyleSheet.create({
app: {
flexDirection: isFactorDesktop ? 'row' : 'column', position: 'absolute', top: 0, right: 0, left: 0, bottom: 0
flexDirection: isFactorDesktop ? 'row' : 'column', top: isNativeMacos ? 35 : 0, right: 0, left: 0, bottom: 0, flex: 1
},
appContainer: {
position: 'absolute',
Expand Down Expand Up @@ -159,7 +159,7 @@ const createStyleSheet = currentTheme => StyleSheet.create({
position: 'absolute',
backgroundColor: currentTheme.colorBgPrimary,
top: hasHorizontalMenu && isWebBased ? -currentTheme.menuHeight : 0,
left: hasModalPadding ? -currentTheme.menuWidth : 0,
left: 0,
right: 0,
bottom: 0
},
Expand Down
6 changes: 3 additions & 3 deletions packages/template-starter/src/navigation/index.desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { NavigationContainer } from '@react-navigation/native';
import { CardStyleInterpolators, createStackNavigator } from '@react-navigation/stack';
import React, { useContext } from 'react';
import { StatusBar, View } from 'react-native';
import { isFactorDesktop } from '@rnv/renative';
import { isFactorDesktop, isPlatformMacos } from '@rnv/renative';
import Menu from '../components/Menu';
import ScreenHome from '../screens/Home';
import ScreenModal from '../screens/Modal';
import ScreenMyPage from '../screens/MyPage';
import { ThemeContext } from '../config';
import { ThemeContext, themeStyles } from '../config';
import { CastButton } from '../components/CastButton';

const Stack = createStackNavigator();
Expand Down Expand Up @@ -58,7 +58,7 @@ const App = () => {
StatusBar.setBarStyle(theme.static.statusBar);
}, []);
return (
<View style={{ flex: 1 }}>
<View style={themeStyles.app}>
<NavigationContainer>
<ModalStack.Navigator
headerMode="none"
Expand Down