Browse Source

Scroll picker width

pull/8/head
Tim Glasgow 2 years ago
parent
commit
e61e558029
  1. 4
      squarenotsquare/src/components/ScrollingPicker.js
  2. 2
      squarenotsquare/src/screens/styles/AppStyles.js

4
squarenotsquare/src/components/ScrollingPicker.js

@ -16,7 +16,7 @@ function ScrollingPicker() {
function onScroll(event){ function onScroll(event){
if (event.nativeEvent.contentOffset.x === 0) { if (event.nativeEvent.contentOffset.x === 0) {
setSelected(0); setSelected(0);
} else if (event.nativeEvent.contentOffset.x === Metrics.icons.buttonIcon) { } else if (event.nativeEvent.contentOffset.x === (Metrics.icons.buttonIcon * 2)) {
setSelected(1); setSelected(1);
} }
Animated.event([ Animated.event([
@ -43,11 +43,13 @@ function ScrollingPicker() {
name={Icons.squareIcons.square} name={Icons.squareIcons.square}
color={Colors.material.dark} color={Colors.material.dark}
size={Metrics.icons.buttonIcon} size={Metrics.icons.buttonIcon}
style={{marginLeft: Metrics.icons.buttonIcon * 0.5, marginRight: Metrics.icons.buttonIcon * 0.5}}
/> />
<MaterialIcon <MaterialIcon
name={Icons.squareIcons.plus} name={Icons.squareIcons.plus}
color={Colors.material.dark} color={Colors.material.dark}
size={Metrics.icons.buttonIcon} size={Metrics.icons.buttonIcon}
style={{marginLeft: Metrics.icons.buttonIcon * 0.5, marginRight: Metrics.icons.buttonIcon * 0.5}}
/> />
</ScrollView> </ScrollView>
); );

2
squarenotsquare/src/screens/styles/AppStyles.js

@ -112,7 +112,7 @@ export const styles = StyleSheet.create({
}, },
modePicker: { modePicker: {
width: Metrics.icons.buttonIcon, width: Metrics.icons.buttonIcon * 2,
overflow: "visible" overflow: "visible"
}, },

Loading…
Cancel
Save