2018-05-16 21:49:03 +00:00
|
|
|
// @flow
|
2018-05-23 12:30:22 +00:00
|
|
|
import { StyleSheet } from 'react-native';
|
2018-05-16 21:49:03 +00:00
|
|
|
|
2018-05-10 23:01:55 +00:00
|
|
|
import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
|
2016-10-05 14:36:59 +00:00
|
|
|
|
2018-05-16 21:49:03 +00:00
|
|
|
// Toolbox, toolbar:
|
|
|
|
|
2016-10-05 14:36:59 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of toolbar buttons.
|
2016-12-14 22:15:17 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
const toolbarButton = {
|
2017-04-11 17:00:41 +00:00
|
|
|
backgroundColor: ColorPalette.white,
|
2018-05-15 11:18:42 +00:00
|
|
|
borderRadius: 20,
|
2017-04-11 17:00:41 +00:00
|
|
|
borderWidth: 0,
|
2018-05-15 11:18:42 +00:00
|
|
|
flex: 0,
|
2017-04-11 17:00:41 +00:00
|
|
|
flexDirection: 'row',
|
2018-05-15 11:18:42 +00:00
|
|
|
height: 40,
|
|
|
|
justifyContent: 'center',
|
2018-05-18 19:35:58 +00:00
|
|
|
|
|
|
|
// XXX We probably tested BoxModel.margin and discovered it to be too small
|
|
|
|
// for our taste.
|
2018-05-18 11:50:34 +00:00
|
|
|
marginHorizontal: 7,
|
2018-05-15 11:18:42 +00:00
|
|
|
opacity: 0.7,
|
|
|
|
width: 40
|
2016-10-05 14:36:59 +00:00
|
|
|
};
|
|
|
|
|
2016-12-14 22:15:17 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The icon style of the toolbar buttons.
|
2016-12-14 22:15:17 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
const toolbarButtonIcon = {
|
|
|
|
alignSelf: 'center',
|
2017-04-11 17:00:41 +00:00
|
|
|
color: ColorPalette.darkGrey,
|
2018-05-15 11:18:42 +00:00
|
|
|
fontSize: 22
|
2016-10-05 14:36:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The Toolbox and toolbar related styles.
|
2016-10-05 14:36:59 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
const styles = createStyleSheet({
|
2017-04-11 14:15:33 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of the toolbar button which hangs the current conference up.
|
2017-04-11 14:15:33 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
hangupButton: {
|
|
|
|
...toolbarButton,
|
|
|
|
backgroundColor: ColorPalette.red,
|
|
|
|
borderRadius: 30,
|
|
|
|
height: 60,
|
|
|
|
width: 60
|
2017-04-11 14:15:33 +00:00
|
|
|
},
|
|
|
|
|
2018-04-18 14:34:40 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The icon style of toolbar buttons which hangs the current conference up.
|
2018-04-18 14:34:40 +00:00
|
|
|
*/
|
|
|
|
hangupButtonIcon: {
|
2018-05-15 11:18:42 +00:00
|
|
|
...toolbarButtonIcon,
|
|
|
|
color: ColorPalette.white,
|
|
|
|
fontSize: 24
|
2018-04-18 14:34:40 +00:00
|
|
|
},
|
|
|
|
|
2016-10-05 14:36:59 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of the toolbar.
|
2016-10-05 14:36:59 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
toolbar: {
|
|
|
|
alignItems: 'center',
|
2017-10-13 16:13:46 +00:00
|
|
|
bottom: 0,
|
2018-05-15 11:18:42 +00:00
|
|
|
flex: 0,
|
2016-12-12 19:49:23 +00:00
|
|
|
flexDirection: 'row',
|
|
|
|
justifyContent: 'center',
|
|
|
|
left: 0,
|
2018-05-18 11:50:34 +00:00
|
|
|
marginBottom: BoxModel.margin / 2,
|
|
|
|
paddingHorizontal: BoxModel.margin,
|
2018-05-15 11:18:42 +00:00
|
|
|
position: 'absolute',
|
2016-12-12 19:49:23 +00:00
|
|
|
right: 0
|
2016-10-05 14:36:59 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of toolbar buttons.
|
2016-10-05 14:36:59 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
toolbarButton,
|
2016-10-05 14:36:59 +00:00
|
|
|
|
2017-04-11 14:15:33 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The icon style of the toolbar buttons.
|
2017-04-11 14:15:33 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
toolbarButtonIcon,
|
2017-04-11 17:00:41 +00:00
|
|
|
|
2016-10-05 14:36:59 +00:00
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of the root/top-level {@link Container} of {@link Toolbox}.
|
|
|
|
* This is the narrow layout version which locates the toolbar on top of
|
|
|
|
* the filmstrip, at the bottom of the screen.
|
2017-10-13 16:13:46 +00:00
|
|
|
*/
|
2017-11-07 14:28:08 +00:00
|
|
|
toolboxNarrow: {
|
2017-10-13 16:13:46 +00:00
|
|
|
flexDirection: 'column',
|
|
|
|
flexGrow: 1
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of the root/top-level {@link Container} of {@link Toolbox}.
|
|
|
|
* This is the wide layout version which locates the toolbar at the bottom
|
|
|
|
* of the screen.
|
2016-10-05 14:36:59 +00:00
|
|
|
*/
|
2017-11-07 14:28:08 +00:00
|
|
|
toolboxWide: {
|
2018-05-23 12:30:22 +00:00
|
|
|
...StyleSheet.absoluteFillObject
|
2016-10-05 14:36:59 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The style of toolbar buttons which display white icons.
|
2017-04-11 17:00:41 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
whiteToolbarButton: {
|
|
|
|
...toolbarButton,
|
2017-04-11 17:00:41 +00:00
|
|
|
backgroundColor: ColorPalette.buttonUnderlay
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2018-05-15 11:18:42 +00:00
|
|
|
* The icon style of toolbar buttons which display white icons.
|
2016-10-05 14:36:59 +00:00
|
|
|
*/
|
2018-05-15 11:18:42 +00:00
|
|
|
whiteToolbarButtonIcon: {
|
|
|
|
...toolbarButtonIcon,
|
2016-11-29 20:04:56 +00:00
|
|
|
color: ColorPalette.white
|
2016-10-05 14:36:59 +00:00
|
|
|
}
|
|
|
|
});
|
2018-05-15 11:18:42 +00:00
|
|
|
|
|
|
|
export default styles;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Styles for the hangup button.
|
|
|
|
*/
|
|
|
|
export const hangupButtonStyles = {
|
|
|
|
iconStyle: styles.whiteToolbarButtonIcon,
|
|
|
|
style: styles.hangupButton,
|
|
|
|
underlayColor: ColorPalette.buttonUnderlay
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Styles for buttons in the toolbar.
|
|
|
|
*/
|
|
|
|
export const toolbarButtonStyles = {
|
|
|
|
iconStyle: styles.toolbarButtonIcon,
|
|
|
|
style: styles.toolbarButton
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Styles for toggled buttons in the toolbar.
|
|
|
|
*/
|
|
|
|
export const toolbarToggledButtonStyles = {
|
|
|
|
iconStyle: styles.whiteToolbarButtonIcon,
|
|
|
|
style: styles.whiteToolbarButton
|
|
|
|
};
|
|
|
|
|
2018-05-16 21:49:03 +00:00
|
|
|
// Overflow menu:
|
|
|
|
|
2018-05-15 11:18:42 +00:00
|
|
|
/**
|
|
|
|
* Styles for the {@code OverflowMenu} items.
|
|
|
|
*
|
|
|
|
* These have been implemented as per the Material Design guidelines:
|
|
|
|
* {@link https://material.io/guidelines/components/bottom-sheets.html}.
|
|
|
|
*/
|
|
|
|
const overflowMenuStyles = createStyleSheet({
|
|
|
|
/**
|
|
|
|
* Container style for a {@code ToolboxItem} rendered in the
|
|
|
|
* {@code OverflowMenu}.
|
|
|
|
*/
|
|
|
|
container: {
|
|
|
|
alignItems: 'center',
|
|
|
|
flexDirection: 'row',
|
|
|
|
height: 48
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Style for the {@code Icon} element in a {@code ToolboxItem} rendered in
|
|
|
|
* the {@code OverflowMenu}.
|
|
|
|
*/
|
|
|
|
icon: {
|
|
|
|
fontSize: 24
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Style for the label in a {@code ToolboxItem} rendered in the
|
|
|
|
* {@code OverflowMenu}.
|
|
|
|
*/
|
|
|
|
label: {
|
|
|
|
flex: 1,
|
|
|
|
fontSize: 16,
|
|
|
|
marginLeft: 32,
|
2018-05-18 19:35:58 +00:00
|
|
|
opacity: 0.90
|
2018-05-15 11:18:42 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export const overflowMenuItemStyles = {
|
|
|
|
iconStyle: overflowMenuStyles.icon,
|
|
|
|
labelStyle: overflowMenuStyles.label,
|
|
|
|
style: overflowMenuStyles.container,
|
|
|
|
underlayColor: '#eee'
|
|
|
|
};
|