Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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