瀏覽代碼

feat(native-participants-pane) slider ui fixes

master
Calin Chitu 3 年之前
父節點
當前提交
7854437e31

+ 9
- 5
react/features/video-menu/components/native/VolumeSlider.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
-import Slider from '@react-native-community/slider';
4
 import _ from 'lodash';
3
 import _ from 'lodash';
5
 import React, { PureComponent } from 'react';
4
 import React, { PureComponent } from 'react';
6
-import { View } from 'react-native';
5
+import { View, Slider } from 'react-native';
7
 import { withTheme } from 'react-native-paper';
6
 import { withTheme } from 'react-native-paper';
8
 
7
 
9
 import { translate } from '../../../base/i18n';
8
 import { translate } from '../../../base/i18n';
16
 import { setVolume } from '../../../participants-pane/actions.native';
15
 import { setVolume } from '../../../participants-pane/actions.native';
17
 import { VOLUME_SLIDER_SCALE } from '../../constants';
16
 import { VOLUME_SLIDER_SCALE } from '../../constants';
18
 
17
 
18
+import styles from './styles';
19
+
20
+
19
 /**
21
 /**
20
  * The type of the React {@code Component} props of {@link VolumeSlider}.
22
  * The type of the React {@code Component} props of {@link VolumeSlider}.
21
  */
23
  */
101
         const onVolumeChange = _startSilent ? undefined : this._onVolumeChange;
103
         const onVolumeChange = _startSilent ? undefined : this._onVolumeChange;
102
 
104
 
103
         return (
105
         return (
104
-            <View>
106
+            <View style = { styles.volumeSliderContainer } >
105
                 <Icon
107
                 <Icon
106
-                    size = { 24 }
107
-                    src = { IconVolumeEmpty } />
108
+                    size = { 20 }
109
+                    src = { IconVolumeEmpty }
110
+                    style = { styles.volumeIcon } />
108
                 <Slider
111
                 <Slider
109
                     maximumTrackTintColor = { palette.field02 }
112
                     maximumTrackTintColor = { palette.field02 }
110
                     maximumValue = { VOLUME_SLIDER_SCALE }
113
                     maximumValue = { VOLUME_SLIDER_SCALE }
111
                     minimumTrackTintColor = { palette.action01 }
114
                     minimumTrackTintColor = { palette.action01 }
112
                     minimumValue = { 0 }
115
                     minimumValue = { 0 }
113
                     onValueChange = { onVolumeChange }
116
                     onValueChange = { onVolumeChange }
117
+                    style = { styles.sliderContainer }
114
                     thumbTintColor = { palette.field02 }
118
                     thumbTintColor = { palette.field02 }
115
                     value = { volumeLevel } />
119
                     value = { volumeLevel } />
116
             </View>
120
             </View>

+ 2
- 2
react/features/video-menu/components/native/styles.js 查看文件

63
     },
63
     },
64
 
64
 
65
     sliderContainer: {
65
     sliderContainer: {
66
-        marginLeft: BaseTheme.spacing[3],
67
-        minWidth: '88%'
66
+        marginLeft: BaseTheme.spacing[2],
67
+        minWidth: '92%'
68
     }
68
     }
69
 });
69
 });

Loading…
取消
儲存