Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // @flow
  2. import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
  3. import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
  4. import { HANGUP_BUTTON_SIZE } from '../../constants';
  5. // Toolbox, toolbar:
  6. /**
  7. * The style of toolbar buttons.
  8. */
  9. const toolbarButton = {
  10. backgroundColor: schemeColor('button'),
  11. borderRadius: 20,
  12. borderWidth: 0,
  13. flex: 0,
  14. flexDirection: 'row',
  15. height: 40,
  16. justifyContent: 'center',
  17. // XXX We probably tested BoxModel.margin and discovered it to be too small
  18. // for our taste.
  19. marginHorizontal: 7,
  20. width: 40
  21. };
  22. /**
  23. * The icon style of the toolbar buttons.
  24. */
  25. const toolbarButtonIcon = {
  26. alignSelf: 'center',
  27. color: ColorPalette.darkGrey,
  28. fontSize: 22
  29. };
  30. /**
  31. * The style of toolbar buttons which display white icons.
  32. */
  33. const whiteToolbarButton = {
  34. ...toolbarButton,
  35. backgroundColor: schemeColor('buttonToggled')
  36. };
  37. /**
  38. * The icon style of toolbar buttons which display white icons.
  39. */
  40. const whiteToolbarButtonIcon = {
  41. ...toolbarButtonIcon,
  42. color: ColorPalette.white
  43. };
  44. /**
  45. * The Toolbox and toolbar related styles.
  46. */
  47. const styles = createStyleSheet({
  48. /**
  49. * The style of the toolbar.
  50. */
  51. toolbar: {
  52. alignItems: 'center',
  53. flexDirection: 'row',
  54. flexGrow: 0,
  55. justifyContent: 'center',
  56. marginBottom: BoxModel.margin / 2,
  57. paddingHorizontal: BoxModel.margin
  58. },
  59. /**
  60. * The style of the root/top-level {@link Container} of {@link Toolbox}.
  61. */
  62. toolbox: {
  63. flexDirection: 'column',
  64. flexGrow: 0
  65. }
  66. });
  67. export default styles;
  68. /**
  69. * Color schemed styles for the @{Toolbox} component.
  70. */
  71. ColorSchemeRegistry.register('Toolbox', {
  72. /**
  73. * Styles for buttons in the toolbar.
  74. */
  75. buttonStyles: {
  76. iconStyle: toolbarButtonIcon,
  77. style: toolbarButton
  78. },
  79. /**
  80. * Overrides to the standard styles that we apply to the chat button, as
  81. * that behaves slightly differently to other buttons.
  82. */
  83. chatButtonOverride: {
  84. toggled: {
  85. backgroundColor: ColorPalette.blue
  86. }
  87. },
  88. hangupButtonStyles: {
  89. iconStyle: whiteToolbarButtonIcon,
  90. style: {
  91. ...toolbarButton,
  92. backgroundColor: schemeColor('hangup'),
  93. borderRadius: HANGUP_BUTTON_SIZE / 2,
  94. height: HANGUP_BUTTON_SIZE,
  95. width: HANGUP_BUTTON_SIZE
  96. },
  97. underlayColor: ColorPalette.buttonUnderlay
  98. },
  99. /**
  100. * Styles for toggled buttons in the toolbar.
  101. */
  102. toggledButtonStyles: {
  103. iconStyle: whiteToolbarButtonIcon,
  104. style: {
  105. ...whiteToolbarButton,
  106. borderColor: schemeColor('buttonToggledBorder'),
  107. borderWidth: 1
  108. }
  109. }
  110. });