Browse Source

[RN] Add color scheme support - Components

master
Bettenbuk Zoltan 6 years ago
parent
commit
e094b6516a
31 changed files with 556 additions and 303 deletions
  1. 12
    2
      react/features/authentication/components/LoginDialog.native.js
  2. 30
    1
      react/features/base/color-scheme/defaultScheme.js
  3. 9
    3
      react/features/base/dialog/components/native/BaseDialog.js
  4. 9
    2
      react/features/base/dialog/components/native/BaseSubmitDialog.js
  5. 28
    2
      react/features/base/dialog/components/native/BottomSheet.js
  6. 14
    6
      react/features/base/dialog/components/native/ConfirmDialog.js
  7. 3
    1
      react/features/base/dialog/components/native/CustomDialog.js
  8. 4
    1
      react/features/base/dialog/components/native/CustomSubmitDialog.js
  9. 13
    5
      react/features/base/dialog/components/native/InputDialog.js
  10. 103
    96
      react/features/base/dialog/components/native/styles.js
  11. 15
    0
      react/features/base/dialog/functions.js
  12. 15
    5
      react/features/base/participants/components/ParticipantView.native.js
  13. 4
    26
      react/features/base/react/components/native/TintedView.js
  14. 5
    0
      react/features/base/react/components/native/styles.js
  15. 1
    0
      react/features/base/styles/components/styles/ColorPalette.js
  16. 13
    1
      react/features/filmstrip/components/native/Thumbnail.js
  17. 36
    13
      react/features/filmstrip/components/styles.js
  18. 20
    10
      react/features/large-video/components/LargeVideo.native.js
  19. 6
    3
      react/features/large-video/components/styles.js
  20. 4
    3
      react/features/recording/components/LiveStream/AbstractStreamKeyForm.js
  21. 14
    2
      react/features/recording/components/LiveStream/native/GoogleSigninForm.js
  22. 31
    7
      react/features/recording/components/LiveStream/native/StreamKeyForm.js
  23. 26
    5
      react/features/recording/components/LiveStream/native/StreamKeyPicker.js
  24. 3
    3
      react/features/recording/components/LiveStream/native/styles.js
  25. 1
    1
      react/features/recording/components/LiveStream/web/StreamKeyForm.js
  26. 18
    5
      react/features/recording/components/Recording/StartRecordingDialogContent.js
  27. 0
    5
      react/features/recording/components/Recording/styles.native.js
  28. 12
    3
      react/features/remote-video-menu/components/native/RemoteVideoMenu.js
  29. 26
    4
      react/features/toolbox/components/native/OverflowMenu.js
  30. 23
    14
      react/features/toolbox/components/native/Toolbox.js
  31. 58
    74
      react/features/toolbox/components/native/styles.js

+ 12
- 2
react/features/authentication/components/LoginDialog.native.js View File

9
     CustomSubmitDialog,
9
     CustomSubmitDialog,
10
     FIELD_UNDERLINE,
10
     FIELD_UNDERLINE,
11
     PLACEHOLDER_COLOR,
11
     PLACEHOLDER_COLOR,
12
+    _abstractMapStateToProps,
12
     inputDialog as inputDialogStyle
13
     inputDialog as inputDialogStyle
13
 } from '../../base/dialog';
14
 } from '../../base/dialog';
14
 import { translate } from '../../base/i18n';
15
 import { translate } from '../../base/i18n';
15
 import { JitsiConnectionErrors } from '../../base/lib-jitsi-meet';
16
 import { JitsiConnectionErrors } from '../../base/lib-jitsi-meet';
17
+import { StyleType } from '../../base/styles';
16
 
18
 
17
 import { authenticateAndUpgradeRole, cancelLogin } from '../actions';
19
 import { authenticateAndUpgradeRole, cancelLogin } from '../actions';
18
 import styles from './styles';
20
 import styles from './styles';
38
      */
40
      */
39
     _connecting: boolean,
41
     _connecting: boolean,
40
 
42
 
43
+    /**
44
+     * The color-schemed stylesheet of the base/dialog feature.
45
+     */
46
+    _dialogStyles: StyleType,
47
+
41
     /**
48
     /**
42
      * The error which occurred during login/authentication.
49
      * The error which occurred during login/authentication.
43
      */
50
      */
134
     render() {
141
     render() {
135
         const {
142
         const {
136
             _connecting: connecting,
143
             _connecting: connecting,
144
+            _dialogStyles,
137
             _error: error,
145
             _error: error,
138
             _progress: progress,
146
             _progress: progress,
139
             t
147
             t
186
                         onChangeText = { this._onUsernameChange }
194
                         onChangeText = { this._onUsernameChange }
187
                         placeholder = { 'user@domain.com' }
195
                         placeholder = { 'user@domain.com' }
188
                         placeholderTextColor = { PLACEHOLDER_COLOR }
196
                         placeholderTextColor = { PLACEHOLDER_COLOR }
189
-                        style = { inputDialogStyle.field }
197
+                        style = { _dialogStyles.field }
190
                         underlineColorAndroid = { FIELD_UNDERLINE }
198
                         underlineColorAndroid = { FIELD_UNDERLINE }
191
                         value = { this.state.username } />
199
                         value = { this.state.username } />
192
                     <TextInput
200
                     <TextInput
195
                         placeholderTextColor = { PLACEHOLDER_COLOR }
203
                         placeholderTextColor = { PLACEHOLDER_COLOR }
196
                         secureTextEntry = { true }
204
                         secureTextEntry = { true }
197
                         style = { [
205
                         style = { [
198
-                            inputDialogStyle.field,
206
+                            _dialogStyles.field,
199
                             inputDialogStyle.bottomField
207
                             inputDialogStyle.bottomField
200
                         ] }
208
                         ] }
201
                         underlineColorAndroid = { FIELD_UNDERLINE }
209
                         underlineColorAndroid = { FIELD_UNDERLINE }
289
  *     _conference: JitsiConference,
297
  *     _conference: JitsiConference,
290
  *     _configHosts: Object,
298
  *     _configHosts: Object,
291
  *     _connecting: boolean,
299
  *     _connecting: boolean,
300
+ *     _dialogStyles: StyleType,
292
  *     _error: Object,
301
  *     _error: Object,
293
  *     _progress: number
302
  *     _progress: number
294
  * }}
303
  * }}
307
     } = state['features/base/connection'];
316
     } = state['features/base/connection'];
308
 
317
 
309
     return {
318
     return {
319
+        ..._abstractMapStateToProps(state),
310
         _conference: authRequired,
320
         _conference: authRequired,
311
         _configHosts: configHosts,
321
         _configHosts: configHosts,
312
         _connecting: Boolean(connecting) || Boolean(thenableWithCancel),
322
         _connecting: Boolean(connecting) || Boolean(thenableWithCancel),

+ 30
- 1
react/features/base/color-scheme/defaultScheme.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { ColorPalette, getRGBAFormat } from '../styles';
4
+
3
 /**
5
 /**
4
  * The default color scheme of the application.
6
  * The default color scheme of the application.
5
  */
7
  */
6
-export default {};
8
+export default {
9
+    'BottomSheet': {
10
+        background: ColorPalette.blackBlue,
11
+        icon: ColorPalette.white,
12
+        label: ColorPalette.white
13
+    },
14
+    'Dialog': {
15
+        background: ColorPalette.blackBlue,
16
+        border: getRGBAFormat(ColorPalette.white, 0.2),
17
+        icon: ColorPalette.white,
18
+        text: ColorPalette.white
19
+    },
20
+    'LargeVideo': {
21
+        background: ColorPalette.black
22
+    },
23
+    'Thumbnail': {
24
+        activeParticipantHighlight: ColorPalette.blue,
25
+        activeParticipantTint: ColorPalette.black,
26
+        background: ColorPalette.black
27
+    },
28
+    'Toolbox': {
29
+        button: getRGBAFormat(ColorPalette.white, 0.7),
30
+        buttonToggled: getRGBAFormat(ColorPalette.buttonUnderlay, 0.7),
31
+        buttonToggledBorder:
32
+            getRGBAFormat(ColorPalette.buttonUnderlay, 0.7),
33
+        hangup: ColorPalette.red
34
+    }
35
+};

+ 9
- 3
react/features/base/dialog/components/native/BaseDialog.js View File

8
 } from 'react-native';
8
 } from 'react-native';
9
 
9
 
10
 import { Icon } from '../../../font-icons';
10
 import { Icon } from '../../../font-icons';
11
+import { StyleType } from '../../../styles';
11
 
12
 
12
 import AbstractDialog, {
13
 import AbstractDialog, {
13
     type Props as AbstractProps,
14
     type Props as AbstractProps,
18
 export type Props = {
19
 export type Props = {
19
     ...AbstractProps,
20
     ...AbstractProps,
20
 
21
 
22
+    /**
23
+     * The color-schemed stylesheet of the feature.
24
+     */
25
+    _dialogStyles: StyleType,
26
+
21
     t: Function
27
     t: Function
22
 }
28
 }
23
 
29
 
43
      * @returns {ReactElement}
49
      * @returns {ReactElement}
44
      */
50
      */
45
     render() {
51
     render() {
46
-        const { style } = this.props;
52
+        const { _dialogStyles, style } = this.props;
47
 
53
 
48
         return (
54
         return (
49
             <View
55
             <View
55
                 <View
61
                 <View
56
                     pointerEvents = 'box-none'
62
                     pointerEvents = 'box-none'
57
                     style = { [
63
                     style = { [
58
-                        styles.dialog,
64
+                        _dialogStyles.dialog,
59
                         this.props.style
65
                         this.props.style
60
                     ] }>
66
                     ] }>
61
                     <TouchableOpacity
67
                     <TouchableOpacity
63
                         style = { styles.closeWrapper }>
69
                         style = { styles.closeWrapper }>
64
                         <Icon
70
                         <Icon
65
                             name = 'close'
71
                             name = 'close'
66
-                            style = { styles.closeStyle } />
72
+                            style = { _dialogStyles.closeStyle } />
67
                     </TouchableOpacity>
73
                     </TouchableOpacity>
68
                     { this._renderContent() }
74
                     { this._renderContent() }
69
                 </View>
75
                 </View>

+ 9
- 2
react/features/base/dialog/components/native/BaseSubmitDialog.js View File

3
 import React from 'react';
3
 import React from 'react';
4
 import { View, Text, TouchableOpacity } from 'react-native';
4
 import { View, Text, TouchableOpacity } from 'react-native';
5
 
5
 
6
+import { StyleType } from '../../../styles';
7
+
6
 import BaseDialog, { type Props as BaseProps } from './BaseDialog';
8
 import BaseDialog, { type Props as BaseProps } from './BaseDialog';
7
 import {
9
 import {
8
     brandedDialog
10
     brandedDialog
11
 type Props = {
13
 type Props = {
12
     ...BaseProps,
14
     ...BaseProps,
13
 
15
 
16
+    /**
17
+     * The color-schemed stylesheet of the feature.
18
+     */
19
+    _dialogStyles: StyleType,
20
+
14
     t: Function
21
     t: Function
15
 }
22
 }
16
 
23
 
46
      * @inheritdoc
53
      * @inheritdoc
47
      */
54
      */
48
     _renderContent() {
55
     _renderContent() {
49
-        const { t } = this.props;
56
+        const { _dialogStyles, t } = this.props;
50
         const additionalButtons = this._renderAdditionalButtons();
57
         const additionalButtons = this._renderAdditionalButtons();
51
 
58
 
52
         return (
59
         return (
65
                                 ? null : brandedDialog.buttonFarLeft,
72
                                 ? null : brandedDialog.buttonFarLeft,
66
                             brandedDialog.buttonFarRight
73
                             brandedDialog.buttonFarRight
67
                         ] }>
74
                         ] }>
68
-                        <Text style = { brandedDialog.text }>
75
+                        <Text style = { _dialogStyles.text }>
69
                             { t(this._getSubmitButtonKey()) }
76
                             { t(this._getSubmitButtonKey()) }
70
                         </Text>
77
                         </Text>
71
                     </TouchableOpacity>
78
                     </TouchableOpacity>

+ 28
- 2
react/features/base/dialog/components/native/BottomSheet.js View File

2
 
2
 
3
 import React, { Component, type Node } from 'react';
3
 import React, { Component, type Node } from 'react';
4
 import { TouchableWithoutFeedback, View } from 'react-native';
4
 import { TouchableWithoutFeedback, View } from 'react-native';
5
+import { connect } from 'react-redux';
5
 
6
 
7
+import { ColorSchemeRegistry } from '../../../color-scheme';
6
 import { Modal } from '../../../react';
8
 import { Modal } from '../../../react';
9
+import { StyleType } from '../../../styles';
7
 
10
 
8
 import { bottomSheetStyles as styles } from './styles';
11
 import { bottomSheetStyles as styles } from './styles';
9
 
12
 
12
  */
15
  */
13
 type Props = {
16
 type Props = {
14
 
17
 
18
+    /**
19
+     * The color-schemed stylesheet of the feature.
20
+     */
21
+    _styles: StyleType,
22
+
15
     /**
23
     /**
16
      * The children to be displayed within this component.
24
      * The children to be displayed within this component.
17
      */
25
      */
28
  * A component emulating Android's BottomSheet. For all intents and purposes,
36
  * A component emulating Android's BottomSheet. For all intents and purposes,
29
  * this component has been designed to work and behave as a {@code Dialog}.
37
  * this component has been designed to work and behave as a {@code Dialog}.
30
  */
38
  */
31
-export default class BottomSheet extends Component<Props> {
39
+class BottomSheet extends Component<Props> {
32
     /**
40
     /**
33
      * Initializes a new {@code BottomSheet} instance.
41
      * Initializes a new {@code BottomSheet} instance.
34
      *
42
      *
47
      * @returns {ReactElement}
55
      * @returns {ReactElement}
48
      */
56
      */
49
     render() {
57
     render() {
58
+        const { _styles } = this.props;
59
+
50
         return [
60
         return [
51
             <View
61
             <View
52
                 key = 'overlay'
62
                 key = 'overlay'
60
                         onPress = { this._onCancel } >
70
                         onPress = { this._onCancel } >
61
                         <View style = { styles.backdrop } />
71
                         <View style = { styles.backdrop } />
62
                     </TouchableWithoutFeedback>
72
                     </TouchableWithoutFeedback>
63
-                    <View style = { styles.sheet }>
73
+                    <View style = { _styles.sheet }>
64
                         { this.props.children }
74
                         { this.props.children }
65
                     </View>
75
                     </View>
66
                 </View>
76
                 </View>
82
         onCancel && onCancel();
92
         onCancel && onCancel();
83
     }
93
     }
84
 }
94
 }
95
+
96
+/**
97
+ * Maps part of the Redux state to the props of this component.
98
+ *
99
+ * @param {Object} state - The Redux state.
100
+ * @returns {{
101
+ *     _styles: StyleType
102
+ * }}
103
+ */
104
+function _mapStateToProps(state) {
105
+    return {
106
+        _styles: ColorSchemeRegistry.get(state, 'BottomSheet')
107
+    };
108
+}
109
+
110
+export default connect(_mapStateToProps)(BottomSheet);

+ 14
- 6
react/features/base/dialog/components/native/ConfirmDialog.js View File

5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
 import { translate } from '../../../i18n';
7
 import { translate } from '../../../i18n';
8
+import { StyleType } from '../../../styles';
9
+
10
+import { _abstractMapStateToProps } from '../../functions';
8
 
11
 
9
 import { type Props as BaseProps } from './BaseDialog';
12
 import { type Props as BaseProps } from './BaseDialog';
10
 import BaseSubmitDialog from './BaseSubmitDialog';
13
 import BaseSubmitDialog from './BaseSubmitDialog';
13
 type Props = {
16
 type Props = {
14
     ...BaseProps,
17
     ...BaseProps,
15
 
18
 
19
+    /**
20
+     * The color-schemed stylesheet of the feature.
21
+     */
22
+    _dialogStyles: StyleType,
23
+
16
     /**
24
     /**
17
      * Untranslated i18n key of the content to be displayed.
25
      * Untranslated i18n key of the content to be displayed.
18
      *
26
      *
49
      * @inheritdoc
57
      * @inheritdoc
50
      */
58
      */
51
     _renderAdditionalButtons() {
59
     _renderAdditionalButtons() {
52
-        const { t } = this.props;
60
+        const { _dialogStyles, t } = this.props;
53
 
61
 
54
         return (
62
         return (
55
             <TouchableOpacity
63
             <TouchableOpacity
57
                 style = { [
65
                 style = { [
58
                     brandedDialog.button,
66
                     brandedDialog.button,
59
                     brandedDialog.buttonFarLeft,
67
                     brandedDialog.buttonFarLeft,
60
-                    brandedDialog.buttonSeparator
68
+                    _dialogStyles.buttonSeparator
61
                 ] }>
69
                 ] }>
62
-                <Text style = { brandedDialog.text }>
70
+                <Text style = { _dialogStyles.text }>
63
                     { t('dialog.confirmNo') }
71
                     { t('dialog.confirmNo') }
64
                 </Text>
72
                 </Text>
65
             </TouchableOpacity>
73
             </TouchableOpacity>
72
      * @inheritdoc
80
      * @inheritdoc
73
      */
81
      */
74
     _renderSubmittable() {
82
     _renderSubmittable() {
75
-        const { contentKey, t } = this.props;
83
+        const { _dialogStyles, contentKey, t } = this.props;
76
         const content
84
         const content
77
             = typeof contentKey === 'string'
85
             = typeof contentKey === 'string'
78
                 ? t(contentKey)
86
                 ? t(contentKey)
79
                 : this._renderHTML(t(contentKey.key, contentKey.params));
87
                 : this._renderHTML(t(contentKey.key, contentKey.params));
80
 
88
 
81
         return (
89
         return (
82
-            <Text style = { brandedDialog.text }>
90
+            <Text style = { _dialogStyles.text }>
83
                 { content }
91
                 { content }
84
             </Text>
92
             </Text>
85
         );
93
         );
88
     _renderHTML: string => Object | string
96
     _renderHTML: string => Object | string
89
 }
97
 }
90
 
98
 
91
-export default translate(connect()(ConfirmDialog));
99
+export default translate(connect(_abstractMapStateToProps)(ConfirmDialog));

+ 3
- 1
react/features/base/dialog/components/native/CustomDialog.js View File

2
 
2
 
3
 import { connect } from 'react-redux';
3
 import { connect } from 'react-redux';
4
 
4
 
5
+import { _abstractMapStateToProps } from '../../functions';
6
+
5
 import BaseDialog, { type Props } from './BaseDialog';
7
 import BaseDialog, { type Props } from './BaseDialog';
6
 
8
 
7
 /**
9
 /**
19
     }
21
     }
20
 }
22
 }
21
 
23
 
22
-export default connect()(CustomDialog);
24
+export default connect(_abstractMapStateToProps)(CustomDialog);

+ 4
- 1
react/features/base/dialog/components/native/CustomSubmitDialog.js View File

4
 
4
 
5
 import { translate } from '../../../i18n';
5
 import { translate } from '../../../i18n';
6
 
6
 
7
+import { _abstractMapStateToProps } from '../../functions';
8
+
7
 import { type Props as BaseProps } from './BaseDialog';
9
 import { type Props as BaseProps } from './BaseDialog';
8
 import BaseSubmitDialog from './BaseSubmitDialog';
10
 import BaseSubmitDialog from './BaseSubmitDialog';
9
 
11
 
27
     }
29
     }
28
 }
30
 }
29
 
31
 
30
-export default translate(connect()(CustomSubmitDialog));
32
+export default translate(
33
+    connect(_abstractMapStateToProps)(CustomSubmitDialog));

+ 13
- 5
react/features/base/dialog/components/native/InputDialog.js View File

5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
 import { translate } from '../../../i18n';
7
 import { translate } from '../../../i18n';
8
+import { StyleType } from '../../../styles';
9
+
10
+import { _abstractMapStateToProps } from '../../functions';
8
 
11
 
9
 import { type State as AbstractState } from '../AbstractDialog';
12
 import { type State as AbstractState } from '../AbstractDialog';
10
 
13
 
18
 type Props = {
21
 type Props = {
19
     ...BaseProps,
22
     ...BaseProps,
20
 
23
 
24
+    /**
25
+     * The color-schemed stylesheet of the feature.
26
+     */
27
+    _dialogStyles: StyleType,
28
+
21
     /**
29
     /**
22
      * The untranslated i18n key for the field label on the dialog.
30
      * The untranslated i18n key for the field label on the dialog.
23
      */
31
      */
63
      * @inheritdoc
71
      * @inheritdoc
64
      */
72
      */
65
     _renderContent() {
73
     _renderContent() {
66
-        const { okDisabled, t } = this.props;
74
+        const { _dialogStyles, okDisabled, t } = this.props;
67
 
75
 
68
         return (
76
         return (
69
             <View>
77
             <View>
72
                         brandedDialog.mainWrapper,
80
                         brandedDialog.mainWrapper,
73
                         styles.fieldWrapper
81
                         styles.fieldWrapper
74
                     ] }>
82
                     ] }>
75
-                    <Text style = { styles.fieldLabel }>
83
+                    <Text style = { _dialogStyles.fieldLabel }>
76
                         { t(this.props.contentKey) }
84
                         { t(this.props.contentKey) }
77
                     </Text>
85
                     </Text>
78
                     <TextInput
86
                     <TextInput
79
                         onChangeText = { this._onChangeText }
87
                         onChangeText = { this._onChangeText }
80
-                        style = { styles.field }
88
+                        style = { _dialogStyles.field }
81
                         underlineColorAndroid = { FIELD_UNDERLINE }
89
                         underlineColorAndroid = { FIELD_UNDERLINE }
82
                         value = { this.state.fieldValue }
90
                         value = { this.state.fieldValue }
83
                         { ...this.props.textInputProps } />
91
                         { ...this.props.textInputProps } />
91
                             brandedDialog.buttonFarLeft,
99
                             brandedDialog.buttonFarLeft,
92
                             brandedDialog.buttonFarRight
100
                             brandedDialog.buttonFarRight
93
                         ] }>
101
                         ] }>
94
-                        <Text style = { brandedDialog.text }>
102
+                        <Text style = { _dialogStyles.text }>
95
                             { t('dialog.Ok') }
103
                             { t('dialog.Ok') }
96
                         </Text>
104
                         </Text>
97
                     </TouchableOpacity>
105
                     </TouchableOpacity>
130
     }
138
     }
131
 }
139
 }
132
 
140
 
133
-export default translate(connect()(InputDialog));
141
+export default translate(connect(_abstractMapStateToProps)(InputDialog));

+ 103
- 96
react/features/base/dialog/components/native/styles.js View File

2
 
2
 
3
 import { StyleSheet } from 'react-native';
3
 import { StyleSheet } from 'react-native';
4
 
4
 
5
+import { ColorSchemeRegistry, schemeColor } from '../../../color-scheme';
5
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
6
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
6
 
7
 
7
 import { PREFERRED_DIALOG_SIZE } from '../../constants';
8
 import { PREFERRED_DIALOG_SIZE } from '../../constants';
8
 
9
 
9
 const BORDER_RADIUS = 5;
10
 const BORDER_RADIUS = 5;
10
-const DIALOG_BORDER_COLOR = 'rgba(255, 255, 255, 0.2)';
11
 
11
 
12
 export const FIELD_UNDERLINE = ColorPalette.transparent;
12
 export const FIELD_UNDERLINE = ColorPalette.transparent;
13
 
13
 
22
 
22
 
23
 export const PLACEHOLDER_COLOR = ColorPalette.lightGrey;
23
 export const PLACEHOLDER_COLOR = ColorPalette.lightGrey;
24
 
24
 
25
-/**
26
- * Default styles for the items of a {@code BottomSheet}-based menu.
27
- *
28
- * These have been implemented as per the Material Design guidelines:
29
- * {@link https://material.io/guidelines/components/bottom-sheets.html}.
30
- */
31
-const bottomSheetItemStyles = createStyleSheet({
32
-    /**
33
-     * Container style for a generic item rendered in the menu.
34
-     */
35
-    style: {
36
-        alignItems: 'center',
37
-        flexDirection: 'row',
38
-        height: MD_ITEM_HEIGHT
39
-    },
40
-
41
-    /**
42
-     * Style for the {@code Icon} element in a generic item of the menu.
43
-     */
44
-    iconStyle: {
45
-        color: ColorPalette.white,
46
-        fontSize: 24
47
-    },
48
-
49
-    /**
50
-     * Style for the label in a generic item rendered in the menu.
51
-     */
52
-    labelStyle: {
53
-        color: ColorPalette.white,
54
-        flexShrink: 1,
55
-        fontSize: MD_FONT_SIZE,
56
-        marginLeft: 32,
57
-        opacity: 0.90
58
-    }
59
-});
60
-
61
-export const bottomSheetItemStylesCombined = {
62
-    ...bottomSheetItemStyles,
63
-    underlayColor: ColorPalette.overflowMenuItemUnderlay
64
-};
65
-
66
 /**
25
 /**
67
  * The React {@code Component} styles of {@code BottomSheet}. These have
26
  * The React {@code Component} styles of {@code BottomSheet}. These have
68
  * been implemented as per the Material Design guidelines:
27
  * been implemented as per the Material Design guidelines:
94
     overlay: {
53
     overlay: {
95
         ...StyleSheet.absoluteFillObject,
54
         ...StyleSheet.absoluteFillObject,
96
         backgroundColor: 'rgba(127, 127, 127, 0.6)'
55
         backgroundColor: 'rgba(127, 127, 127, 0.6)'
97
-    },
98
-
99
-    /**
100
-     * Bottom sheet's base style.
101
-     */
102
-    sheet: {
103
-        backgroundColor: 'rgb(0, 3, 6)',
104
-        flex: 1,
105
-        paddingHorizontal: MD_ITEM_MARGIN_PADDING,
106
-        paddingVertical: 8
107
     }
56
     }
108
 });
57
 });
109
 
58
 
131
         borderBottomRightRadius: BORDER_RADIUS
80
         borderBottomRightRadius: BORDER_RADIUS
132
     },
81
     },
133
 
82
 
134
-    buttonSeparator: {
135
-        borderRightColor: DIALOG_BORDER_COLOR,
136
-        borderRightWidth: 1
137
-    },
138
-
139
     buttonWrapper: {
83
     buttonWrapper: {
140
         alignItems: 'stretch',
84
         alignItems: 'stretch',
141
         borderRadius: BORDER_RADIUS,
85
         borderRadius: BORDER_RADIUS,
142
         flexDirection: 'row'
86
         flexDirection: 'row'
143
     },
87
     },
144
 
88
 
145
-    closeStyle: {
146
-        color: ColorPalette.white,
147
-        fontSize: MD_FONT_SIZE
148
-    },
149
-
150
     closeWrapper: {
89
     closeWrapper: {
151
         alignSelf: 'flex-end',
90
         alignSelf: 'flex-end',
152
         padding: BoxModel.padding
91
         padding: BoxModel.padding
153
     },
92
     },
154
 
93
 
155
-    dialog: {
156
-        alignItems: 'stretch',
157
-        backgroundColor: 'rgb(0, 3, 6)',
158
-        borderColor: DIALOG_BORDER_COLOR,
159
-        borderRadius: BORDER_RADIUS,
160
-        borderWidth: 1,
161
-        flex: 1,
162
-        flexDirection: 'column',
163
-        maxWidth: PREFERRED_DIALOG_SIZE
164
-    },
165
-
166
     mainWrapper: {
94
     mainWrapper: {
167
         alignSelf: 'stretch',
95
         alignSelf: 'stretch',
168
         padding: BoxModel.padding * 2,
96
         padding: BoxModel.padding * 2,
179
         flexDirection: 'row',
107
         flexDirection: 'row',
180
         justifyContent: 'center',
108
         justifyContent: 'center',
181
         padding: 30
109
         padding: 30
110
+    }
111
+});
112
+
113
+/**
114
+ * Reusable (colored) style for text in any branded dialogs.
115
+ */
116
+const brandedDialogText = {
117
+    color: schemeColor('text'),
118
+    fontSize: MD_FONT_SIZE,
119
+    textAlign: 'center'
120
+};
121
+
122
+export const inputDialog = createStyleSheet({
123
+    bottomField: {
124
+        marginBottom: 0
182
     },
125
     },
183
 
126
 
184
-    text: {
185
-        color: ColorPalette.white,
186
-        fontSize: MD_FONT_SIZE,
187
-        textAlign: 'center'
127
+    fieldWrapper: {
128
+        ...brandedDialog.mainWrapper,
129
+        paddingBottom: BoxModel.padding * 2
188
     }
130
     }
189
 });
131
 });
190
 
132
 
191
 /**
133
 /**
192
- * The React {@code Component} styles of {@code Dialog}.
134
+ * Default styles for the items of a {@code BottomSheet}-based menu.
135
+ *
136
+ * These have been implemented as per the Material Design guidelines:
137
+ * {@link https://material.io/guidelines/components/bottom-sheets.html}.
193
  */
138
  */
194
-export const dialog = createStyleSheet({
139
+ColorSchemeRegistry.register('BottomSheet', {
195
     /**
140
     /**
196
-     * The style of the {@code Text} in a {@code Dialog} button.
141
+     * Style for the {@code Icon} element in a generic item of the menu.
197
      */
142
      */
198
-    buttonText: {
199
-        color: ColorPalette.blue
143
+    iconStyle: {
144
+        color: schemeColor('icon'),
145
+        fontSize: 24
200
     },
146
     },
201
 
147
 
202
     /**
148
     /**
203
-     * The style of the {@code Text} in a {@code Dialog} button which is
204
-     * disabled.
149
+     * Style for the label in a generic item rendered in the menu.
205
      */
150
      */
206
-    disabledButtonText: {
207
-        color: ColorPalette.darkGrey
208
-    }
151
+    labelStyle: {
152
+        color: schemeColor('label'),
153
+        flexShrink: 1,
154
+        fontSize: MD_FONT_SIZE,
155
+        marginLeft: 32,
156
+        opacity: 0.90
157
+    },
158
+
159
+    /**
160
+     * Bottom sheet's base style.
161
+     */
162
+    sheet: {
163
+        backgroundColor: schemeColor('background'),
164
+        flex: 1,
165
+        paddingHorizontal: MD_ITEM_MARGIN_PADDING,
166
+        paddingVertical: 8
167
+    },
168
+
169
+    /**
170
+     * Container style for a generic item rendered in the menu.
171
+     */
172
+    style: {
173
+        alignItems: 'center',
174
+        flexDirection: 'row',
175
+        height: MD_ITEM_HEIGHT
176
+    },
177
+
178
+    /**
179
+     * Additional style that is not directly used as a style object.
180
+     */
181
+    underlayColor: ColorPalette.overflowMenuItemUnderlay
209
 });
182
 });
210
 
183
 
211
-export const inputDialog = createStyleSheet({
212
-    bottomField: {
213
-        marginBottom: 0
184
+/**
185
+ * Color schemed styles for all the component based on the abstract dialog.
186
+ */
187
+ColorSchemeRegistry.register('Dialog', {
188
+    /**
189
+     * Separator line for the buttons in a dialog.
190
+     */
191
+    buttonSeparator: {
192
+        borderRightColor: schemeColor('border'),
193
+        borderRightWidth: 1
214
     },
194
     },
215
 
195
 
196
+    /**
197
+     * Style of the close icon on a dialog.
198
+     */
199
+    closeStyle: {
200
+        color: schemeColor('icon'),
201
+        fontSize: MD_FONT_SIZE
202
+    },
203
+
204
+    /**
205
+     * Base style of the dialogs.
206
+     */
207
+    dialog: {
208
+        alignItems: 'stretch',
209
+        backgroundColor: schemeColor('background'),
210
+        borderColor: schemeColor('border'),
211
+        borderRadius: BORDER_RADIUS,
212
+        borderWidth: 1,
213
+        flex: 1,
214
+        flexDirection: 'column',
215
+        maxWidth: PREFERRED_DIALOG_SIZE
216
+    },
217
+
218
+    /**
219
+     * Field on an input dialog.
220
+     */
216
     field: {
221
     field: {
217
-        ...brandedDialog.text,
222
+        ...brandedDialogText,
218
         borderBottomWidth: 1,
223
         borderBottomWidth: 1,
219
-        borderColor: DIALOG_BORDER_COLOR,
224
+        borderColor: schemeColor('border'),
220
         margin: BoxModel.margin,
225
         margin: BoxModel.margin,
221
         textAlign: 'left'
226
         textAlign: 'left'
222
     },
227
     },
223
 
228
 
229
+    /**
230
+     * Style for the field label on an input dialog.
231
+     */
224
     fieldLabel: {
232
     fieldLabel: {
225
-        ...brandedDialog.text,
233
+        ...brandedDialogText,
226
         margin: BoxModel.margin,
234
         margin: BoxModel.margin,
227
         textAlign: 'left'
235
         textAlign: 'left'
228
     },
236
     },
229
 
237
 
230
-    fieldWrapper: {
231
-        ...brandedDialog.mainWrapper,
232
-        paddingBottom: BoxModel.padding * 2
238
+    text: {
239
+        ...brandedDialogText
233
     }
240
     }
234
 });
241
 });

+ 15
- 0
react/features/base/dialog/functions.js View File

1
 /* @flow */
1
 /* @flow */
2
 
2
 
3
+import { ColorSchemeRegistry } from '../color-scheme';
3
 import { toState } from '../redux';
4
 import { toState } from '../redux';
4
 
5
 
5
 /**
6
 /**
15
 export function isDialogOpen(stateful: Function | Object, component: Object) {
16
 export function isDialogOpen(stateful: Function | Object, component: Object) {
16
     return toState(stateful)['features/base/dialog'].component === component;
17
     return toState(stateful)['features/base/dialog'].component === component;
17
 }
18
 }
19
+
20
+/**
21
+ * Maps part of the Redux state to the props of any Dialog based component.
22
+ *
23
+ * @param {Object} state - The Redux state.
24
+ * @returns {{
25
+ *     _dialogStyles: StyleType
26
+ * }}
27
+ */
28
+export function _abstractMapStateToProps(state: Object): Object {
29
+    return {
30
+        _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog')
31
+    };
32
+}

+ 15
- 5
react/features/base/participants/components/ParticipantView.native.js View File

12
     VideoTrack
12
     VideoTrack
13
 } from '../../media';
13
 } from '../../media';
14
 import { Container, TintedView } from '../../react';
14
 import { Container, TintedView } from '../../react';
15
+import { StyleType } from '../../styles';
15
 import { TestHint } from '../../testing/components';
16
 import { TestHint } from '../../testing/components';
16
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17
 
18
 
97
      */
98
      */
98
     tintEnabled: boolean,
99
     tintEnabled: boolean,
99
 
100
 
101
+    /**
102
+     * The style of the tinting when applied.
103
+     */
104
+    tintStyle: StyleType,
105
+
100
     /**
106
     /**
101
      * The test hint id which can be used to locate the {@code ParticipantView}
107
      * The test hint id which can be used to locate the {@code ParticipantView}
102
      * on the jitsi-meet-torture side. If not provided, the
108
      * on the jitsi-meet-torture side. If not provided, the
186
      */
192
      */
187
     render() {
193
     render() {
188
         const {
194
         const {
189
-            onPress,
190
             _avatar: avatar,
195
             _avatar: avatar,
191
             _connectionStatus: connectionStatus,
196
             _connectionStatus: connectionStatus,
192
             _renderVideo: renderVideo,
197
             _renderVideo: renderVideo,
193
-            _videoTrack: videoTrack
198
+            _videoTrack: videoTrack,
199
+            onPress,
200
+            tintStyle
194
         } = this.props;
201
         } = this.props;
195
 
202
 
196
         const waitForVideoStarted = false;
203
         const waitForVideoStarted = false;
199
         const renderAvatar = Boolean(!renderVideo && avatar);
206
         const renderAvatar = Boolean(!renderVideo && avatar);
200
 
207
 
201
         // If the connection has problems, we will "tint" the video / avatar.
208
         // If the connection has problems, we will "tint" the video / avatar.
209
+        const connectionProblem
210
+            = connectionStatus !== JitsiParticipantConnectionStatus.ACTIVE;
202
         const useTint
211
         const useTint
203
-            = connectionStatus !== JitsiParticipantConnectionStatus.ACTIVE
204
-                || this.props.tintEnabled;
212
+            = connectionProblem || this.props.tintEnabled;
205
 
213
 
206
         const testHintId
214
         const testHintId
207
             = this.props.testHintId
215
             = this.props.testHintId
238
                 { useTint
246
                 { useTint
239
 
247
 
240
                     // If the connection has problems, tint the video / avatar.
248
                     // If the connection has problems, tint the video / avatar.
241
-                    && <TintedView /> }
249
+                    && <TintedView
250
+                        style = {
251
+                            connectionProblem ? undefined : tintStyle } /> }
242
 
252
 
243
                 { this.props.useConnectivityInfoLabel
253
                 { this.props.useConnectivityInfoLabel
244
                     && this._renderConnectionInfo(connectionStatus) }
254
                     && this._renderConnectionInfo(connectionStatus) }

+ 4
- 26
react/features/base/react/components/native/TintedView.js View File

3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 import { StyleSheet, View } from 'react-native';
4
 import { StyleSheet, View } from 'react-native';
5
 
5
 
6
-import { ColorPalette } from '../../../styles';
6
+import { TINTED_VIEW_DEFAULT } from './styles';
7
 
7
 
8
 /**
8
 /**
9
  * Base style for the {@code TintedView} component.
9
  * Base style for the {@code TintedView} component.
24
      */
24
      */
25
     children?: React$Node,
25
     children?: React$Node,
26
 
26
 
27
-    /**
28
-     * Color used as the background of the view. Defaults to
29
-     */
30
-    color: string,
31
-
32
-    /**
33
-     * Opacity for the
34
-     */
35
-    opacity: number,
36
-
37
     /**
27
     /**
38
      * Style to override the base style.
28
      * Style to override the base style.
39
      */
29
      */
45
  * the given color and opacity.
35
  * the given color and opacity.
46
  */
36
  */
47
 export default class TintedView extends Component<Props> {
37
 export default class TintedView extends Component<Props> {
48
-    /**
49
-     * Default values for the component's props.
50
-     */
51
-    static defaultProps = {
52
-        color: ColorPalette.appBackground,
53
-        opacity: 0.8,
54
-        style: {}
55
-    };
56
-
57
     /**
38
     /**
58
      * Implements React's {@link Component#render()}.
39
      * Implements React's {@link Component#render()}.
59
      *
40
      *
61
      * @returns {ReactElement}
42
      * @returns {ReactElement}
62
      */
43
      */
63
     render() {
44
     render() {
64
-        const { children, color, opacity, style } = this.props;
45
+        const { children, style } = this.props;
65
 
46
 
66
         // XXX Don't tint the children, tint the background only.
47
         // XXX Don't tint the children, tint the background only.
67
         return (
48
         return (
72
                     pointerEvents = 'none'
53
                     pointerEvents = 'none'
73
                     style = { [
54
                     style = { [
74
                         BASE_STYLE,
55
                         BASE_STYLE,
75
-                        style,
76
-                        {
77
-                            backgroundColor: color,
78
-                            opacity
79
-                        }
56
+                        TINTED_VIEW_DEFAULT,
57
+                        style
80
                     ] } />
58
                     ] } />
81
                 <View
59
                 <View
82
                     pointerEvents = 'box-none'
60
                     pointerEvents = 'box-none'

+ 5
- 0
react/features/base/react/components/native/styles.js View File

324
     }
324
     }
325
 };
325
 };
326
 
326
 
327
+export const TINTED_VIEW_DEFAULT = {
328
+    backgroundColor: ColorPalette.appBackground,
329
+    opacity: 0.8
330
+};
331
+
327
 /**
332
 /**
328
  * The styles of the generic React {@code Component}s implemented by the feature
333
  * The styles of the generic React {@code Component}s implemented by the feature
329
  * base/react.
334
  * base/react.

+ 1
- 0
react/features/base/styles/components/styles/ColorPalette.js View File

18
      * the sake of consistency.
18
      * the sake of consistency.
19
      */
19
      */
20
     black: BLACK,
20
     black: BLACK,
21
+    blackBlue: 'rgb(0, 3, 6)',
21
     blue: '#17A0DB',
22
     blue: '#17A0DB',
22
     blueHighlight: '#1081b2',
23
     blueHighlight: '#1081b2',
23
     buttonUnderlay: '#495258',
24
     buttonUnderlay: '#495258',

+ 13
- 1
react/features/filmstrip/components/native/Thumbnail.js View File

3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
5
 
5
 
6
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
6
 import { openDialog } from '../../../base/dialog';
7
 import { openDialog } from '../../../base/dialog';
7
 import { Audio, MEDIA_TYPE } from '../../../base/media';
8
 import { Audio, MEDIA_TYPE } from '../../../base/media';
8
 import {
9
 import {
12
     pinParticipant
13
     pinParticipant
13
 } from '../../../base/participants';
14
 } from '../../../base/participants';
14
 import { Container } from '../../../base/react';
15
 import { Container } from '../../../base/react';
16
+import { StyleType } from '../../../base/styles';
15
 import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
17
 import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
16
 
18
 
17
 import { RemoteVideoMenu } from '../../../remote-video-menu';
19
 import { RemoteVideoMenu } from '../../../remote-video-menu';
53
      */
55
      */
54
     _onShowRemoteVideoMenu: ?Function,
56
     _onShowRemoteVideoMenu: ?Function,
55
 
57
 
58
+    /**
59
+     * The color-schemed stylesheet of the feature.
60
+     */
61
+    _styles: StyleType,
62
+
56
     /**
63
     /**
57
      * The Redux representation of the participant's video track.
64
      * The Redux representation of the participant's video track.
58
      */
65
      */
106
             _largeVideo: largeVideo,
113
             _largeVideo: largeVideo,
107
             _onClick,
114
             _onClick,
108
             _onShowRemoteVideoMenu,
115
             _onShowRemoteVideoMenu,
116
+            _styles,
109
             _videoTrack: videoTrack,
117
             _videoTrack: videoTrack,
110
             disablePin,
118
             disablePin,
111
             disableTint,
119
             disableTint,
135
                 style = { [
143
                 style = { [
136
                     styles.thumbnail,
144
                     styles.thumbnail,
137
                     participant.pinned && !disablePin
145
                     participant.pinned && !disablePin
138
-                        ? styles.thumbnailPinned : null,
146
+                        ? _styles.thumbnailPinned : null,
139
                     this.props.styleOverrides || null
147
                     this.props.styleOverrides || null
140
                 ] }
148
                 ] }
141
                 touchFeedback = { false }>
149
                 touchFeedback = { false }>
148
                 <ParticipantView
156
                 <ParticipantView
149
                     avatarSize = { AVATAR_SIZE }
157
                     avatarSize = { AVATAR_SIZE }
150
                     participantId = { participantId }
158
                     participantId = { participantId }
159
+                    style = { _styles.participantViewStyle }
151
                     tintEnabled = { participantInLargeVideo && !disableTint }
160
                     tintEnabled = { participantInLargeVideo && !disableTint }
161
+                    tintStyle = { _styles.activeThumbnailTint }
152
                     zOrder = { 1 } />
162
                     zOrder = { 1 } />
153
 
163
 
154
                 { participant.role === PARTICIPANT_ROLE.MODERATOR
164
                 { participant.role === PARTICIPANT_ROLE.MODERATOR
219
  *      _audioTrack: Track,
229
  *      _audioTrack: Track,
220
  *      _isModerator: boolean,
230
  *      _isModerator: boolean,
221
  *      _largeVideo: Object,
231
  *      _largeVideo: Object,
232
+ *      _styles: StyleType,
222
  *      _videoTrack: Track
233
  *      _videoTrack: Track
223
  *  }}
234
  *  }}
224
  */
235
  */
238
         _audioTrack: audioTrack,
249
         _audioTrack: audioTrack,
239
         _isModerator: isLocalParticipantModerator(state),
250
         _isModerator: isLocalParticipantModerator(state),
240
         _largeVideo: largeVideo,
251
         _largeVideo: largeVideo,
252
+        _styles: ColorSchemeRegistry.get(state, 'Thumbnail'),
241
         _videoTrack: videoTrack
253
         _videoTrack: videoTrack
242
     };
254
     };
243
 }
255
 }

+ 36
- 13
react/features/filmstrip/components/styles.js View File

1
+// @flow
2
+
3
+import { ColorSchemeRegistry, schemeColor } from '../../base/color-scheme';
1
 import { ColorPalette } from '../../base/styles';
4
 import { ColorPalette } from '../../base/styles';
2
 import { FILMSTRIP_SIZE } from '../constants';
5
 import { FILMSTRIP_SIZE } from '../constants';
3
 
6
 
134
         position: 'absolute'
137
         position: 'absolute'
135
     },
138
     },
136
 
139
 
137
-    /**
138
-     * Pinned video thumbnail style.
139
-     */
140
-    thumbnailPinned: {
141
-        borderColor: ColorPalette.blue,
142
-        shadowColor: ColorPalette.black,
143
-        shadowOffset: {
144
-            height: 5,
145
-            width: 5
146
-        },
147
-        shadowRadius: 5
148
-    },
149
-
150
     tileView: {
140
     tileView: {
151
         alignSelf: 'center'
141
         alignSelf: 'center'
152
     },
142
     },
160
         justifyContent: 'center'
150
         justifyContent: 'center'
161
     }
151
     }
162
 };
152
 };
153
+
154
+/**
155
+ * Color schemed styles for the @{code Thumbnail} component.
156
+ */
157
+ColorSchemeRegistry.register('Thumbnail', {
158
+
159
+    /**
160
+     * Tinting style of the on-stage participant thumbnail.
161
+     */
162
+    activeThumbnailTint: {
163
+        backgroundColor: schemeColor('activeParticipantTint')
164
+    },
165
+
166
+    /**
167
+     * Coloring if the thumbnail background.
168
+     */
169
+    participantViewStyle: {
170
+        backgroundColor: schemeColor('background')
171
+    },
172
+
173
+    /**
174
+     * Pinned video thumbnail style.
175
+     */
176
+    thumbnailPinned: {
177
+        borderColor: schemeColor('activeParticipantHighlight'),
178
+        shadowColor: schemeColor('activeParticipantHighlight'),
179
+        shadowOffset: {
180
+            height: 5,
181
+            width: 5
182
+        },
183
+        shadowRadius: 5
184
+    }
185
+});

+ 20
- 10
react/features/large-video/components/LargeVideo.native.js View File

3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
5
 
5
 
6
+import { ColorSchemeRegistry } from '../../base/color-scheme';
6
 import { ParticipantView } from '../../base/participants';
7
 import { ParticipantView } from '../../base/participants';
7
 import { DimensionsDetector } from '../../base/responsive-ui';
8
 import { DimensionsDetector } from '../../base/responsive-ui';
9
+import { StyleType } from '../../base/styles';
8
 
10
 
9
-import styles, { AVATAR_SIZE } from './styles';
11
+import { AVATAR_SIZE } from './styles';
10
 
12
 
11
 /**
13
 /**
12
  * The type of the React {@link Component} props of {@link LargeVideo}.
14
  * The type of the React {@link Component} props of {@link LargeVideo}.
13
  */
15
  */
14
 type Props = {
16
 type Props = {
15
 
17
 
16
-    /**
17
-     * Callback to invoke when the {@code LargeVideo} is clicked/pressed.
18
-     */
19
-    onClick: Function,
20
-
21
     /**
18
     /**
22
      * The ID of the participant (to be) depicted by LargeVideo.
19
      * The ID of the participant (to be) depicted by LargeVideo.
23
      *
20
      *
24
      * @private
21
      * @private
25
      */
22
      */
26
-    _participantId: string
23
+    _participantId: string,
24
+
25
+    /**
26
+     * The color-schemed stylesheet of the feature.
27
+     */
28
+    _styles: StyleType,
29
+
30
+    /**
31
+     * Callback to invoke when the {@code LargeVideo} is clicked/pressed.
32
+     */
33
+    onClick: Function,
27
 };
34
 };
28
 
35
 
29
 /**
36
 /**
114
         } = this.state;
121
         } = this.state;
115
         const {
122
         const {
116
             _participantId,
123
             _participantId,
124
+            _styles,
117
             onClick
125
             onClick
118
         } = this.props;
126
         } = this.props;
119
 
127
 
124
                     avatarSize = { avatarSize }
132
                     avatarSize = { avatarSize }
125
                     onPress = { onClick }
133
                     onPress = { onClick }
126
                     participantId = { _participantId }
134
                     participantId = { _participantId }
127
-                    style = { styles.largeVideo }
135
+                    style = { _styles.largeVideo }
128
                     testHintId = 'org.jitsi.meet.LargeVideo'
136
                     testHintId = 'org.jitsi.meet.LargeVideo'
129
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
137
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
130
                     zOrder = { 0 }
138
                     zOrder = { 0 }
140
  * @param {Object} state - Redux state.
148
  * @param {Object} state - Redux state.
141
  * @private
149
  * @private
142
  * @returns {{
150
  * @returns {{
143
- *     _participantId: string
151
+ *     _participantId: string,
152
+ *     _styles: StyleType
144
  * }}
153
  * }}
145
  */
154
  */
146
 function _mapStateToProps(state) {
155
 function _mapStateToProps(state) {
147
     return {
156
     return {
148
-        _participantId: state['features/large-video'].participantId
157
+        _participantId: state['features/large-video'].participantId,
158
+        _styles: ColorSchemeRegistry.get(state, 'LargeVideo')
149
     };
159
     };
150
 }
160
 }
151
 
161
 

+ 6
- 3
react/features/large-video/components/styles.js View File

1
 import { StyleSheet } from 'react-native';
1
 import { StyleSheet } from 'react-native';
2
 
2
 
3
-import { ColorPalette, createStyleSheet } from '../../base/styles';
3
+import { ColorSchemeRegistry, schemeColor } from '../../base/color-scheme';
4
 
4
 
5
 /**
5
 /**
6
  * Size for the Avatar.
6
  * Size for the Avatar.
7
  */
7
  */
8
 export const AVATAR_SIZE = 200;
8
 export const AVATAR_SIZE = 200;
9
 
9
 
10
-export default createStyleSheet({
10
+/**
11
+ * Color schemed styles for the @{LargeVideo} component.
12
+ */
13
+ColorSchemeRegistry.register('LargeVideo', {
11
 
14
 
12
     /**
15
     /**
13
      * Large video container style.
16
      * Large video container style.
15
     largeVideo: {
18
     largeVideo: {
16
         ...StyleSheet.absoluteFillObject,
19
         ...StyleSheet.absoluteFillObject,
17
         alignItems: 'stretch',
20
         alignItems: 'stretch',
18
-        backgroundColor: ColorPalette.appBackground,
21
+        backgroundColor: schemeColor('background'),
19
         flex: 1,
22
         flex: 1,
20
         justifyContent: 'center'
23
         justifyContent: 'center'
21
     }
24
     }

+ 4
- 3
react/features/recording/components/LiveStream/AbstractStreamKeyForm.js View File

52
  *
52
  *
53
  * @extends Component
53
  * @extends Component
54
  */
54
  */
55
-export default class AbstractStreamKeyForm extends Component<Props, State> {
55
+export default class AbstractStreamKeyForm<P: Props>
56
+    extends Component<P, State> {
56
     helpURL: string;
57
     helpURL: string;
57
     _debouncedUpdateValidationErrorVisibility: Function;
58
     _debouncedUpdateValidationErrorVisibility: Function;
58
 
59
 
61
      *
62
      *
62
      * @inheritdoc
63
      * @inheritdoc
63
      */
64
      */
64
-    constructor(props: Props) {
65
+    constructor(props: P) {
65
         super(props);
66
         super(props);
66
 
67
 
67
         this.state = {
68
         this.state = {
88
      *
89
      *
89
      * @inheritdoc
90
      * @inheritdoc
90
      */
91
      */
91
-    componentDidUpdate(prevProps: Props) {
92
+    componentDidUpdate(prevProps: P) {
92
         if (this.props.value !== prevProps.value) {
93
         if (this.props.value !== prevProps.value) {
93
             this._debouncedUpdateValidationErrorVisibility();
94
             this._debouncedUpdateValidationErrorVisibility();
94
         }
95
         }

+ 14
- 2
react/features/recording/components/LiveStream/native/GoogleSigninForm.js View File

4
 import { Text, View } from 'react-native';
4
 import { Text, View } from 'react-native';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
+import { _abstractMapStateToProps } from '../../../../base/dialog';
7
 import { translate } from '../../../../base/i18n';
8
 import { translate } from '../../../../base/i18n';
9
+import { StyleType } from '../../../../base/styles';
8
 
10
 
9
 import {
11
 import {
10
     GOOGLE_API_STATES,
12
     GOOGLE_API_STATES,
23
  */
25
  */
24
 type Props = {
26
 type Props = {
25
 
27
 
28
+    /**
29
+     * Style of the dialogs feature.
30
+     */
31
+    _dialogStyles: StyleType,
32
+
26
     /**
33
     /**
27
      * The Redux dispatch Function.
34
      * The Redux dispatch Function.
28
      */
35
      */
102
      * @inheritdoc
109
      * @inheritdoc
103
      */
110
      */
104
     render() {
111
     render() {
105
-        const { t } = this.props;
112
+        const { _dialogStyles, t } = this.props;
106
         const { googleAPIState, googleResponse } = this.props;
113
         const { googleAPIState, googleResponse } = this.props;
107
         const signedInUser = googleResponse
114
         const signedInUser = googleResponse
108
             && googleResponse.user
115
             && googleResponse.user
121
         return (
128
         return (
122
             <View style = { styles.formWrapper }>
129
             <View style = { styles.formWrapper }>
123
                 <View style = { styles.helpText }>
130
                 <View style = { styles.helpText }>
124
-                    <Text style = { styles.text }>
131
+                    <Text
132
+                        style = { [
133
+                            _dialogStyles.text,
134
+                            styles.text
135
+                        ] }>
125
                         { userInfo }
136
                         { userInfo }
126
                     </Text>
137
                     </Text>
127
                 </View>
138
                 </View>
225
     const { googleAPIState, googleResponse } = state['features/google-api'];
236
     const { googleAPIState, googleResponse } = state['features/google-api'];
226
 
237
 
227
     return {
238
     return {
239
+        ..._abstractMapStateToProps(state),
228
         googleAPIState,
240
         googleAPIState,
229
         googleResponse
241
         googleResponse
230
     };
242
     };

+ 31
- 7
react/features/recording/components/LiveStream/native/StreamKeyForm.js View File

2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
 import { Linking, Text, TextInput, TouchableOpacity, View } from 'react-native';
4
 import { Linking, Text, TextInput, TouchableOpacity, View } from 'react-native';
5
+import { connect } from 'react-redux';
5
 
6
 
7
+import { _abstractMapStateToProps } from '../../../../base/dialog';
6
 import { translate } from '../../../../base/i18n';
8
 import { translate } from '../../../../base/i18n';
9
+import { StyleType } from '../../../../base/styles';
7
 
10
 
8
 import AbstractStreamKeyForm, {
11
 import AbstractStreamKeyForm, {
9
-    type Props
12
+    type Props as AbstractProps
10
 } from '../AbstractStreamKeyForm';
13
 } from '../AbstractStreamKeyForm';
11
 
14
 
15
+type Props = AbstractProps & {
16
+
17
+    /**
18
+     * Style of the dialogs feature.
19
+     */
20
+    _dialogStyles: StyleType
21
+};
22
+
12
 import styles, { PLACEHOLDER_COLOR } from './styles';
23
 import styles, { PLACEHOLDER_COLOR } from './styles';
13
 
24
 
14
 /**
25
 /**
16
  *
27
  *
17
  * @extends Component
28
  * @extends Component
18
  */
29
  */
19
-class StreamKeyForm extends AbstractStreamKeyForm {
30
+class StreamKeyForm extends AbstractStreamKeyForm<Props> {
20
     /**
31
     /**
21
      * Initializes a new {@code StreamKeyForm} instance.
32
      * Initializes a new {@code StreamKeyForm} instance.
22
      *
33
      *
37
      * @returns {ReactElement}
48
      * @returns {ReactElement}
38
      */
49
      */
39
     render() {
50
     render() {
40
-        const { t } = this.props;
51
+        const { _dialogStyles, t } = this.props;
41
 
52
 
42
         return (
53
         return (
43
             <View style = { styles.formWrapper }>
54
             <View style = { styles.formWrapper }>
44
-                <Text style = { styles.streamKeyInputLabel }>
55
+                <Text
56
+                    style = { [
57
+                        _dialogStyles.text,
58
+                        styles.text,
59
+                        styles.streamKeyInputLabel
60
+                    ] }>
45
                     {
61
                     {
46
                         t('dialog.streamKey')
62
                         t('dialog.streamKey')
47
                     }
63
                     }
56
                     {
72
                     {
57
                         this.state.showValidationError
73
                         this.state.showValidationError
58
                             ? <View style = { styles.formFooterItem }>
74
                             ? <View style = { styles.formFooterItem }>
59
-                                <Text style = { styles.warningText }>
75
+                                <Text
76
+                                    style = { [
77
+                                        _dialogStyles.text,
78
+                                        styles.warningText
79
+                                    ] }>
60
                                     { t('liveStreaming.invalidStreamKey') }
80
                                     { t('liveStreaming.invalidStreamKey') }
61
                                 </Text>
81
                                 </Text>
62
                             </View>
82
                             </View>
66
                         <TouchableOpacity
86
                         <TouchableOpacity
67
                             onPress = { this._onOpenHelp }
87
                             onPress = { this._onOpenHelp }
68
                             style = { styles.streamKeyHelp } >
88
                             style = { styles.streamKeyHelp } >
69
-                            <Text style = { styles.text }>
89
+                            <Text
90
+                                style = { [
91
+                                    _dialogStyles.text,
92
+                                    styles.text
93
+                                ] }>
70
                                 {
94
                                 {
71
                                     t('liveStreaming.streamIdHelp')
95
                                     t('liveStreaming.streamIdHelp')
72
                                 }
96
                                 }
98
     }
122
     }
99
 }
123
 }
100
 
124
 
101
-export default translate(StreamKeyForm);
125
+export default translate(connect(_abstractMapStateToProps)(StreamKeyForm));

+ 26
- 5
react/features/recording/components/LiveStream/native/StreamKeyPicker.js View File

8
     TouchableOpacity,
8
     TouchableOpacity,
9
     View
9
     View
10
 } from 'react-native';
10
 } from 'react-native';
11
+import { connect } from 'react-redux';
11
 
12
 
13
+import { _abstractMapStateToProps } from '../../../../base/dialog';
12
 import { translate } from '../../../../base/i18n';
14
 import { translate } from '../../../../base/i18n';
15
+import { StyleType } from '../../../../base/styles';
13
 
16
 
14
 import { YOUTUBE_LIVE_DASHBOARD_URL } from '../constants';
17
 import { YOUTUBE_LIVE_DASHBOARD_URL } from '../constants';
15
 
18
 
17
 
20
 
18
 type Props = {
21
 type Props = {
19
 
22
 
23
+    /**
24
+     * Style of the dialogs feature.
25
+     */
26
+    _dialogStyles: StyleType,
27
+
20
     /**
28
     /**
21
      * The list of broadcasts the user can pick from.
29
      * The list of broadcasts the user can pick from.
22
      */
30
      */
74
      * @inheritdoc
82
      * @inheritdoc
75
      */
83
      */
76
     render() {
84
     render() {
77
-        const { broadcasts } = this.props;
85
+        const { _dialogStyles, broadcasts } = this.props;
78
 
86
 
79
         if (!broadcasts) {
87
         if (!broadcasts) {
80
             return null;
88
             return null;
85
                 <View style = { styles.formWrapper }>
93
                 <View style = { styles.formWrapper }>
86
                     <TouchableOpacity
94
                     <TouchableOpacity
87
                         onPress = { this._onOpenYoutubeDashboard }>
95
                         onPress = { this._onOpenYoutubeDashboard }>
88
-                        <Text style = { styles.warningText }>
96
+                        <Text
97
+                            style = { [
98
+                                _dialogStyles.text,
99
+                                styles.warningText
100
+                            ] }>
89
                             { this.props.t(
101
                             { this.props.t(
90
                                 'liveStreaming.getStreamKeyManually') }
102
                                 'liveStreaming.getStreamKeyManually') }
91
                         </Text>
103
                         </Text>
97
         return (
109
         return (
98
             <View style = { styles.formWrapper }>
110
             <View style = { styles.formWrapper }>
99
                 <View style = { styles.streamKeyPickerCta }>
111
                 <View style = { styles.streamKeyPickerCta }>
100
-                    <Text style = { styles.text }>
112
+                    <Text
113
+                        style = { [
114
+                            _dialogStyles.text,
115
+                            styles.text
116
+                        ] }>
101
                         { this.props.t('liveStreaming.choose') }
117
                         { this.props.t('liveStreaming.choose') }
102
                     </Text>
118
                     </Text>
103
                 </View>
119
                 </View>
113
                                     ? styles.streamKeyPickerItemHighlight : null
129
                                     ? styles.streamKeyPickerItemHighlight : null
114
                             ] }
130
                             ] }
115
                             underlayColor = { TOUCHABLE_UNDERLAY }>
131
                             underlayColor = { TOUCHABLE_UNDERLAY }>
116
-                            <Text style = { styles.text }>
132
+                            <Text
133
+                                style = { [
134
+                                    _dialogStyles.text,
135
+                                    styles.text
136
+                                ] }>
117
                                 { broadcast.title }
137
                                 { broadcast.title }
118
                             </Text>
138
                             </Text>
119
                         </TouchableHighlight>))
139
                         </TouchableHighlight>))
155
     }
175
     }
156
 }
176
 }
157
 
177
 
158
-export default translate(StreamKeyPicker);
178
+export default translate(
179
+    connect(_abstractMapStateToProps)(StreamKeyPicker));

+ 3
- 3
react/features/recording/components/LiveStream/native/styles.js View File

99
      * Label for the previous field.
99
      * Label for the previous field.
100
      */
100
      */
101
     streamKeyInputLabel: {
101
     streamKeyInputLabel: {
102
-        alignSelf: 'flex-start',
103
-        color: ColorPalette.white
102
+        alignSelf: 'flex-start'
104
     },
103
     },
105
 
104
 
106
     /**
105
     /**
146
     },
145
     },
147
 
146
 
148
     text: {
147
     text: {
149
-        color: ColorPalette.white
148
+        fontSize: 14,
149
+        textAlign: 'left'
150
     },
150
     },
151
 
151
 
152
     /**
152
     /**

+ 1
- 1
react/features/recording/components/LiveStream/web/StreamKeyForm.js View File

14
  *
14
  *
15
  * @extends Component
15
  * @extends Component
16
  */
16
  */
17
-class StreamKeyForm extends AbstractStreamKeyForm {
17
+class StreamKeyForm extends AbstractStreamKeyForm<Props> {
18
 
18
 
19
     /**
19
     /**
20
      * Initializes a new {@code StreamKeyForm} instance.
20
      * Initializes a new {@code StreamKeyForm} instance.

+ 18
- 5
react/features/recording/components/Recording/StartRecordingDialogContent.js View File

7
     createRecordingDialogEvent,
7
     createRecordingDialogEvent,
8
     sendAnalytics
8
     sendAnalytics
9
 } from '../../../analytics';
9
 } from '../../../analytics';
10
-import { DialogContent } from '../../../base/dialog';
10
+import {
11
+    DialogContent,
12
+    _abstractMapStateToProps
13
+} from '../../../base/dialog';
11
 import { translate } from '../../../base/i18n';
14
 import { translate } from '../../../base/i18n';
12
 import {
15
 import {
13
     Container,
16
     Container,
15
     Switch,
18
     Switch,
16
     Text
19
     Text
17
 } from '../../../base/react';
20
 } from '../../../base/react';
21
+import { StyleType } from '../../../base/styles';
18
 import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
22
 import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
19
 
23
 
20
 import styles from './styles';
24
 import styles from './styles';
22
 
26
 
23
 type Props = {
27
 type Props = {
24
 
28
 
29
+    /**
30
+     * Style of the dialogs feature.
31
+     */
32
+    _dialogStyles: StyleType,
33
+
25
     /**
34
     /**
26
      * The redux dispatch function.
35
      * The redux dispatch function.
27
      */
36
      */
99
      */
108
      */
100
     _renderNoIntegrationsContent() {
109
     _renderNoIntegrationsContent() {
101
         return (
110
         return (
102
-            <DialogContent style = { styles.noIntegrationContent }>
111
+            <DialogContent style = { this.props._dialogStyles.text }>
103
                 { this.props.t('recording.startRecordingBody') }
112
                 { this.props.t('recording.startRecordingBody') }
104
             </DialogContent>
113
             </DialogContent>
105
         );
114
         );
112
      * @returns {React$Component}
121
      * @returns {React$Component}
113
      */
122
      */
114
     _renderIntegrationsContent() {
123
     _renderIntegrationsContent() {
115
-        const { isTokenValid, isValidating, t } = this.props;
124
+        const { _dialogStyles, isTokenValid, isValidating, t } = this.props;
116
 
125
 
117
         let content = null;
126
         let content = null;
118
 
127
 
135
                     style = { styles.header }>
144
                     style = { styles.header }>
136
                     <Text
145
                     <Text
137
                         className = 'recording-title'
146
                         className = 'recording-title'
138
-                        style = { styles.title }>
147
+                        style = { [
148
+                            _dialogStyles.text,
149
+                            styles.title
150
+                        ] }>
139
                         { t('recording.authDropboxText') }
151
                         { t('recording.authDropboxText') }
140
                     </Text>
152
                     </Text>
141
                     <Switch
153
                     <Switch
248
     }
260
     }
249
 }
261
 }
250
 
262
 
251
-export default translate(connect()(StartRecordingDialogContent));
263
+export default translate(
264
+    connect(_abstractMapStateToProps)(StartRecordingDialogContent));

+ 0
- 5
react/features/recording/components/Recording/styles.native.js View File

28
         paddingBottom: _PADDING
28
         paddingBottom: _PADDING
29
     },
29
     },
30
 
30
 
31
-    noIntegrationContent: {
32
-        color: ColorPalette.white
33
-    },
34
-
35
     startRecordingText: {
31
     startRecordingText: {
36
         paddingBottom: _PADDING
32
         paddingBottom: _PADDING
37
     },
33
     },
42
     },
38
     },
43
 
39
 
44
     title: {
40
     title: {
45
-        color: ColorPalette.white,
46
         fontSize: 16,
41
         fontSize: 16,
47
         fontWeight: 'bold'
42
         fontWeight: 'bold'
48
     },
43
     },

+ 12
- 3
react/features/remote-video-menu/components/native/RemoteVideoMenu.js View File

4
 import { Text, View } from 'react-native';
4
 import { Text, View } from 'react-native';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
 import {
8
 import {
8
-    BottomSheet,
9
-    bottomSheetItemStylesCombined
9
+    BottomSheet
10
 } from '../../../base/dialog';
10
 } from '../../../base/dialog';
11
 import {
11
 import {
12
     Avatar,
12
     Avatar,
13
     getAvatarURL,
13
     getAvatarURL,
14
     getParticipantDisplayName
14
     getParticipantDisplayName
15
 } from '../../../base/participants';
15
 } from '../../../base/participants';
16
+import { StyleType } from '../../../base/styles';
16
 
17
 
17
 import { hideRemoteVideoMenu } from '../../actions';
18
 import { hideRemoteVideoMenu } from '../../actions';
18
 
19
 
42
      */
43
      */
43
     _avatarURL: string,
44
     _avatarURL: string,
44
 
45
 
46
+    /**
47
+     * The color-schemed stylesheet of the BottomSheet.
48
+     */
49
+    _bottomSheetStyles: StyleType,
50
+
45
     /**
51
     /**
46
      * Display name of the participant retreived from Redux.
52
      * Display name of the participant retreived from Redux.
47
      */
53
      */
73
             afterClick: this._onCancel,
79
             afterClick: this._onCancel,
74
             showLabel: true,
80
             showLabel: true,
75
             participantID: this.props.participant.id,
81
             participantID: this.props.participant.id,
76
-            styles: bottomSheetItemStylesCombined
82
+            styles: this.props._bottomSheetStyles
77
         };
83
         };
78
 
84
 
79
         return (
85
         return (
113
  * @private
119
  * @private
114
  * @returns {{
120
  * @returns {{
115
  *      _avatarURL: string,
121
  *      _avatarURL: string,
122
+ *      _bottomSheetStyles: StyleType,
116
  *      _participantDisplayName: string
123
  *      _participantDisplayName: string
117
  *  }}
124
  *  }}
118
  */
125
  */
121
 
128
 
122
     return {
129
     return {
123
         _avatarURL: getAvatarURL(participant),
130
         _avatarURL: getAvatarURL(participant),
131
+        _bottomSheetStyles:
132
+            ColorSchemeRegistry.get(state, 'BottomSheet'),
124
         _participantDisplayName: getParticipantDisplayName(
133
         _participantDisplayName: getParticipantDisplayName(
125
             state, participant.id)
134
             state, participant.id)
126
     };
135
     };

+ 26
- 4
react/features/toolbox/components/native/OverflowMenu.js View File

4
 import { Platform } from 'react-native';
4
 import { Platform } from 'react-native';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
 import {
8
 import {
8
     BottomSheet,
9
     BottomSheet,
9
-    bottomSheetItemStylesCombined,
10
     hideDialog
10
     hideDialog
11
 } from '../../../base/dialog';
11
 } from '../../../base/dialog';
12
+import { StyleType } from '../../../base/styles';
12
 import { InviteButton } from '../../../invite';
13
 import { InviteButton } from '../../../invite';
13
 import { AudioRouteButton } from '../../../mobile/audio-mode';
14
 import { AudioRouteButton } from '../../../mobile/audio-mode';
14
 import { LiveStreamButton, RecordButton } from '../../../recording';
15
 import { LiveStreamButton, RecordButton } from '../../../recording';
26
  */
27
  */
27
 type Props = {
28
 type Props = {
28
 
29
 
30
+    /**
31
+     * The color-schemed stylesheet of the dialog feature.
32
+     */
33
+    _bottomSheetStyles: StyleType,
34
+
29
     /**
35
     /**
30
      * Used for hiding the dialog when the selection was completed.
36
      * Used for hiding the dialog when the selection was completed.
31
      */
37
      */
32
-    dispatch: Function,
38
+    dispatch: Function
33
 };
39
 };
34
 
40
 
35
 /**
41
 /**
68
         const buttonProps = {
74
         const buttonProps = {
69
             afterClick: this._onCancel,
75
             afterClick: this._onCancel,
70
             showLabel: true,
76
             showLabel: true,
71
-            styles: bottomSheetItemStylesCombined
77
+            styles: this.props._bottomSheetStyles
72
         };
78
         };
73
 
79
 
74
         return (
80
         return (
106
     }
112
     }
107
 }
113
 }
108
 
114
 
109
-OverflowMenu_ = connect()(OverflowMenu);
115
+/**
116
+ * Function that maps parts of Redux state tree into component props.
117
+ *
118
+ * @param {Object} state - Redux state.
119
+ * @private
120
+ * @returns {{
121
+ *      _bottomSheetStyles: StyleType
122
+ *  }}
123
+ */
124
+function _mapStateToProps(state) {
125
+    return {
126
+        _bottomSheetStyles:
127
+            ColorSchemeRegistry.get(state, 'BottomSheet')
128
+    };
129
+}
130
+
131
+OverflowMenu_ = connect(_mapStateToProps)(OverflowMenu);
110
 
132
 
111
 export default OverflowMenu_;
133
 export default OverflowMenu_;

+ 23
- 14
react/features/toolbox/components/native/Toolbox.js View File

5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
6
 
6
 
7
 import { Container } from '../../../base/react';
7
 import { Container } from '../../../base/react';
8
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
9
+import { StyleType } from '../../../base/styles';
8
 import { ChatButton } from '../../../chat';
10
 import { ChatButton } from '../../../chat';
9
 
11
 
10
 import { isToolboxVisible } from '../../functions';
12
 import { isToolboxVisible } from '../../functions';
13
+import { HANGUP_BUTTON_SIZE } from '../../constants';
11
 
14
 
12
 import AudioMuteButton from '../AudioMuteButton';
15
 import AudioMuteButton from '../AudioMuteButton';
13
 import HangupButton from '../HangupButton';
16
 import HangupButton from '../HangupButton';
14
-import VideoMuteButton from '../VideoMuteButton';
15
 
17
 
16
 import OverflowMenuButton from './OverflowMenuButton';
18
 import OverflowMenuButton from './OverflowMenuButton';
17
-import styles, {
18
-    chatButtonOverride,
19
-    hangupButtonStyles,
20
-    toolbarButtonStyles,
21
-    toolbarToggledButtonStyles
22
-} from './styles';
19
+import styles from './styles';
20
+import VideoMuteButton from '../VideoMuteButton';
23
 
21
 
24
 /**
22
 /**
25
  * The number of buttons other than {@link HangupButton} to render in
23
  * The number of buttons other than {@link HangupButton} to render in
43
  */
41
  */
44
 type Props = {
42
 type Props = {
45
 
43
 
44
+    /**
45
+     * The color-schemed stylesheet of the feature.
46
+     */
47
+    _styles: StyleType,
48
+
46
     /**
49
     /**
47
      * The indicator which determines whether the toolbox is visible.
50
      * The indicator which determines whether the toolbox is visible.
48
      */
51
      */
111
      * @returns {number}
114
      * @returns {number}
112
      */
115
      */
113
     _calculateButtonSize() {
116
     _calculateButtonSize() {
117
+        const { _styles } = this.props;
114
         const { width } = this.state;
118
         const { width } = this.state;
115
 
119
 
116
         if (width <= 0) {
120
         if (width <= 0) {
118
             return width;
122
             return width;
119
         }
123
         }
120
 
124
 
121
-        const hangupButtonSize = styles.hangupButton.width;
122
-        const { style } = toolbarButtonStyles;
125
+        const hangupButtonSize = HANGUP_BUTTON_SIZE;
126
+        const { style } = _styles.buttonStyles;
123
         let buttonSize
127
         let buttonSize
124
             = (width
128
             = (width
125
 
129
 
155
      * @returns {Object | Array}
159
      * @returns {Object | Array}
156
      */
160
      */
157
     _getChatButtonToggledStyle(baseStyle) {
161
     _getChatButtonToggledStyle(baseStyle) {
162
+        const { _styles } = this.props;
163
+
158
         if (Array.isArray(baseStyle.style)) {
164
         if (Array.isArray(baseStyle.style)) {
159
             return {
165
             return {
160
                 ...baseStyle,
166
                 ...baseStyle,
161
                 style: [
167
                 style: [
162
                     ...baseStyle.style,
168
                     ...baseStyle.style,
163
-                    chatButtonOverride.toggled
169
+                    _styles.chatButtonOverride.toggled
164
                 ]
170
                 ]
165
             };
171
             };
166
         }
172
         }
169
             ...baseStyle,
175
             ...baseStyle,
170
             style: [
176
             style: [
171
                 baseStyle.style,
177
                 baseStyle.style,
172
-                chatButtonOverride.toggled
178
+                _styles.chatButtonOverride.toggled
173
             ]
179
             ]
174
         };
180
         };
175
     }
181
     }
196
      * @returns {React$Node}
202
      * @returns {React$Node}
197
      */
203
      */
198
     _renderToolbar() {
204
     _renderToolbar() {
205
+        const { _styles } = this.props;
199
         const buttonSize = this._calculateButtonSize();
206
         const buttonSize = this._calculateButtonSize();
200
-        let buttonStyles = toolbarButtonStyles;
201
-        let toggledButtonStyles = toolbarToggledButtonStyles;
207
+        let { buttonStyles, toggledButtonStyles } = _styles;
202
 
208
 
203
         if (buttonSize > 0) {
209
         if (buttonSize > 0) {
204
             const extraButtonStyle = {
210
             const extraButtonStyle = {
241
                 <AudioMuteButton
247
                 <AudioMuteButton
242
                     styles = { buttonStyles }
248
                     styles = { buttonStyles }
243
                     toggledStyles = { toggledButtonStyles } />
249
                     toggledStyles = { toggledButtonStyles } />
244
-                <HangupButton styles = { hangupButtonStyles } />
250
+                <HangupButton
251
+                    styles = { _styles.hangupButtonStyles } />
245
                 <VideoMuteButton
252
                 <VideoMuteButton
246
                     styles = { buttonStyles }
253
                     styles = { buttonStyles }
247
                     toggledStyles = { toggledButtonStyles } />
254
                     toggledStyles = { toggledButtonStyles } />
261
  * {@code Toolbox} props.
268
  * {@code Toolbox} props.
262
  * @private
269
  * @private
263
  * @returns {{
270
  * @returns {{
271
+ *     _styles: StyleType,
264
  *     _visible: boolean
272
  *     _visible: boolean
265
  * }}
273
  * }}
266
  */
274
  */
267
 function _mapStateToProps(state: Object): Object {
275
 function _mapStateToProps(state: Object): Object {
268
     return {
276
     return {
277
+        _styles: ColorSchemeRegistry.get(state, 'Toolbox'),
269
         _visible: isToolboxVisible(state)
278
         _visible: isToolboxVisible(state)
270
     };
279
     };
271
 }
280
 }

+ 58
- 74
react/features/toolbox/components/native/styles.js View File

1
 // @flow
1
 // @flow
2
+
3
+import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
2
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
4
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
3
 
5
 
4
 import { HANGUP_BUTTON_SIZE } from '../../constants';
6
 import { HANGUP_BUTTON_SIZE } from '../../constants';
9
  * The style of toolbar buttons.
11
  * The style of toolbar buttons.
10
  */
12
  */
11
 const toolbarButton = {
13
 const toolbarButton = {
12
-    backgroundColor: ColorPalette.white,
14
+    backgroundColor: schemeColor('button'),
13
     borderRadius: 20,
15
     borderRadius: 20,
14
     borderWidth: 0,
16
     borderWidth: 0,
15
     flex: 0,
17
     flex: 0,
20
     // XXX We probably tested BoxModel.margin and discovered it to be too small
22
     // XXX We probably tested BoxModel.margin and discovered it to be too small
21
     // for our taste.
23
     // for our taste.
22
     marginHorizontal: 7,
24
     marginHorizontal: 7,
23
-    opacity: 0.7,
24
     width: 40
25
     width: 40
25
 };
26
 };
26
 
27
 
33
     fontSize: 22
34
     fontSize: 22
34
 };
35
 };
35
 
36
 
37
+/**
38
+ * The style of toolbar buttons which display white icons.
39
+ */
40
+const whiteToolbarButton = {
41
+    ...toolbarButton,
42
+    backgroundColor: schemeColor('buttonToggled')
43
+};
44
+
45
+/**
46
+ * The icon style of toolbar buttons which display white icons.
47
+ */
48
+const whiteToolbarButtonIcon = {
49
+    ...toolbarButtonIcon,
50
+    color: ColorPalette.white
51
+};
52
+
36
 /**
53
 /**
37
  * The Toolbox and toolbar related styles.
54
  * The Toolbox and toolbar related styles.
38
  */
55
  */
39
 const styles = createStyleSheet({
56
 const styles = createStyleSheet({
40
-    /**
41
-     * The style of the toolbar button which hangs the current conference up.
42
-     */
43
-    hangupButton: {
44
-        ...toolbarButton,
45
-        backgroundColor: ColorPalette.red,
46
-        borderRadius: 30,
47
-        height: HANGUP_BUTTON_SIZE,
48
-        width: HANGUP_BUTTON_SIZE
49
-    },
50
-
51
-    /**
52
-     * The icon style of toolbar buttons which hangs the current conference up.
53
-     */
54
-    hangupButtonIcon: {
55
-        ...toolbarButtonIcon,
56
-        color: ColorPalette.white,
57
-        fontSize: 24
58
-    },
59
 
57
 
60
     /**
58
     /**
61
      * The style of the toolbar.
59
      * The style of the toolbar.
69
         paddingHorizontal: BoxModel.margin
67
         paddingHorizontal: BoxModel.margin
70
     },
68
     },
71
 
69
 
72
-    /**
73
-     * The style of toolbar buttons.
74
-     */
75
-    toolbarButton,
76
-
77
-    /**
78
-     * The icon style of the toolbar buttons.
79
-     */
80
-    toolbarButtonIcon,
81
-
82
     /**
70
     /**
83
      * The style of the root/top-level {@link Container} of {@link Toolbox}.
71
      * The style of the root/top-level {@link Container} of {@link Toolbox}.
84
      */
72
      */
85
     toolbox: {
73
     toolbox: {
86
         flexDirection: 'column',
74
         flexDirection: 'column',
87
         flexGrow: 0
75
         flexGrow: 0
88
-    },
89
-
90
-    /**
91
-     * The style of toolbar buttons which display white icons.
92
-     */
93
-    whiteToolbarButton: {
94
-        ...toolbarButton,
95
-        backgroundColor: ColorPalette.buttonUnderlay
96
-    },
97
-
98
-    /**
99
-     * The icon style of toolbar buttons which display white icons.
100
-     */
101
-    whiteToolbarButtonIcon: {
102
-        ...toolbarButtonIcon,
103
-        color: ColorPalette.white
104
     }
76
     }
105
 });
77
 });
106
 
78
 
107
 export default styles;
79
 export default styles;
108
 
80
 
109
 /**
81
 /**
110
- * Styles for the hangup button.
82
+ * Color schemed styles for the @{Toolbox} component.
111
  */
83
  */
112
-export const hangupButtonStyles = {
113
-    iconStyle: styles.whiteToolbarButtonIcon,
114
-    style: styles.hangupButton,
115
-    underlayColor: ColorPalette.buttonUnderlay
116
-};
84
+ColorSchemeRegistry.register('Toolbox', {
85
+    /**
86
+     * Styles for buttons in the toolbar.
87
+     */
88
+    buttonStyles: {
89
+        iconStyle: toolbarButtonIcon,
90
+        style: toolbarButton
91
+    },
117
 
92
 
118
-/**
119
- * Styles for buttons in the toolbar.
120
- */
121
-export const toolbarButtonStyles = {
122
-    iconStyle: styles.toolbarButtonIcon,
123
-    style: styles.toolbarButton
124
-};
93
+    /**
94
+     * Overrides to the standard styles that we apply to the chat button, as
95
+     * that behaves slightly differently to other buttons.
96
+     */
97
+    chatButtonOverride: {
98
+        toggled: {
99
+            backgroundColor: ColorPalette.blue
100
+        }
101
+    },
125
 
102
 
126
-/**
127
- * Styles for toggled buttons in the toolbar.
128
- */
129
-export const toolbarToggledButtonStyles = {
130
-    iconStyle: styles.whiteToolbarButtonIcon,
131
-    style: styles.whiteToolbarButton
132
-};
103
+    hangupButtonStyles: {
104
+        iconStyle: whiteToolbarButtonIcon,
105
+        style: {
106
+            ...toolbarButton,
107
+            backgroundColor: schemeColor('hangup'),
108
+            borderRadius: HANGUP_BUTTON_SIZE / 2,
109
+            height: HANGUP_BUTTON_SIZE,
110
+            width: HANGUP_BUTTON_SIZE
111
+        },
112
+        underlayColor: ColorPalette.buttonUnderlay
113
+    },
133
 
114
 
134
-/**
135
- * Overrides to the standard styles that we apply to the chat button, as that
136
- * behaves slightly differently to other buttons.
137
- */
138
-export const chatButtonOverride = createStyleSheet({
139
-    toggled: {
140
-        backgroundColor: ColorPalette.blue
115
+    /**
116
+     * Styles for toggled buttons in the toolbar.
117
+     */
118
+    toggledButtonStyles: {
119
+        iconStyle: whiteToolbarButtonIcon,
120
+        style: {
121
+            ...whiteToolbarButton,
122
+            borderColor: schemeColor('buttonToggledBorder'),
123
+            borderWidth: 1
124
+        }
141
     }
125
     }
142
 });
126
 });

Loading…
Cancel
Save