1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +02:00

Mobile: Moved slider value to the left so that it is visible while dragging

This commit is contained in:
Laurent Cozic
2019-06-27 00:05:17 +01:00
parent a1e8e71359
commit ffc311d7bd

View File

@@ -125,6 +125,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
sliderUnits: { sliderUnits: {
color: theme.color, color: theme.color,
fontSize: theme.fontSize, fontSize: theme.fontSize,
marginRight: 10,
}, },
settingDescriptionText: { settingDescriptionText: {
color: theme.color, color: theme.color,
@@ -307,9 +308,9 @@ class ConfigScreenComponent extends BaseScreenComponent {
return ( return (
<View key={key} style={this.styles().settingContainer}> <View key={key} style={this.styles().settingContainer}>
<Text key="label" style={this.styles().settingText}>{md.label()}</Text> <Text key="label" style={this.styles().settingText}>{md.label()}</Text>
<View style={{display:'flex', flexDirection: 'column', alignItems: 'center', flex:1}}> <View style={{display:'flex', flexDirection: 'row', alignItems: 'center', flex:1}}>
<Slider key="control" minimumTrackTintColor={theme.color} maximumTrackTintColor={theme.color} style={{width:'100%'}} step={md.step} minimumValue={md.minimum} maximumValue={md.maximum} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
<Text style={this.styles().sliderUnits}>{unitLabel}</Text> <Text style={this.styles().sliderUnits}>{unitLabel}</Text>
<Slider key="control" minimumTrackTintColor={theme.color} maximumTrackTintColor={theme.color} style={{flex:1}} step={md.step} minimumValue={md.minimum} maximumValue={md.maximum} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
</View> </View>
</View> </View>
); );