[RN] Consistent margins for Filmstrip and Toolbox

With the introduction of wide and narrow layouts the margins of the
Filmstrip and the Toolbox became inconsistent. For example, the
Filmstrip's top in the wide layout was nearer to the top than the
secondary Toolbar.
This commit is contained in:
Lyubo Marinov 2017-11-07 16:59:34 -06:00
parent d0c079dba5
commit 2b8a770163
3 changed files with 19 additions and 16 deletions

View File

@ -1,4 +1,5 @@
import { import {
BoxModel,
ColorPalette, ColorPalette,
createStyleSheet, createStyleSheet,
fixAndroidViewClipping fixAndroidViewClipping
@ -41,16 +42,21 @@ export default createStyleSheet({
}, },
/** /**
* The style of the view which expands over the whole conference area and * The style of the {@link View} which expands over the whole
* splits it between both the filmstrip and the toolbox. * {@link Conference} area and splits it between the {@link Filmstrip} and
* the {@link Toolbox}.
*/ */
toolboxAndFilmstripContainer: { toolboxAndFilmstripContainer: {
bottom: 0, bottom: BoxModel.margin,
flexDirection: 'column', flexDirection: 'column',
justifyContent: 'flex-end', justifyContent: 'flex-end',
left: 0, left: BoxModel.margin,
position: 'absolute', position: 'absolute',
right: 0, right: BoxModel.margin,
top: 0
// Both on Android and iOS there is the status bar which may be visible.
// On iPhone X there is the notch. In the two cases BoxModel.margin is
// not enough.
top: BoxModel.margin * 3
} }
}); });

View File

@ -1,5 +1,5 @@
import { Platform } from '../../base/react'; import { Platform } from '../../base/react';
import { BoxModel, ColorPalette } from '../../base/styles'; import { ColorPalette } from '../../base/styles';
/** /**
* The base style of {@link Filmstrip} shared between narrow and wide versions. * The base style of {@link Filmstrip} shared between narrow and wide versions.
@ -54,10 +54,7 @@ export default {
filmstripNarrow: { filmstripNarrow: {
...filmstrip, ...filmstrip,
alignItems: 'flex-end', alignItems: 'flex-end',
height: 90, height: 90
marginBottom: BoxModel.margin,
marginLeft: BoxModel.margin,
marginRight: BoxModel.margin
}, },
/** /**
@ -66,10 +63,10 @@ export default {
*/ */
filmstripWide: { filmstripWide: {
...filmstrip, ...filmstrip,
bottom: BoxModel.margin, bottom: 0,
left: BoxModel.margin, left: 0,
position: 'absolute', position: 'absolute',
top: BoxModel.margin top: 0
}, },
/** /**

View File

@ -111,8 +111,8 @@ export default createStyleSheet({
..._toolbar, ..._toolbar,
bottom: 0, bottom: 0,
flexDirection: 'column', flexDirection: 'column',
right: BoxModel.margin, right: 0,
top: BoxModel.margin * 2 top: 0
}, },
/** /**