From e61e558029916bc7ed6037a7404fb85fb02f185b Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Tue, 9 Aug 2022 18:00:02 -0500 Subject: [PATCH] Scroll picker width --- squarenotsquare/src/components/ScrollingPicker.js | 4 +++- squarenotsquare/src/screens/styles/AppStyles.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/squarenotsquare/src/components/ScrollingPicker.js b/squarenotsquare/src/components/ScrollingPicker.js index 0e61660..8ce4292 100644 --- a/squarenotsquare/src/components/ScrollingPicker.js +++ b/squarenotsquare/src/components/ScrollingPicker.js @@ -16,7 +16,7 @@ function ScrollingPicker() { function onScroll(event){ if (event.nativeEvent.contentOffset.x === 0) { setSelected(0); - } else if (event.nativeEvent.contentOffset.x === Metrics.icons.buttonIcon) { + } else if (event.nativeEvent.contentOffset.x === (Metrics.icons.buttonIcon * 2)) { setSelected(1); } Animated.event([ @@ -43,11 +43,13 @@ function ScrollingPicker() { name={Icons.squareIcons.square} color={Colors.material.dark} size={Metrics.icons.buttonIcon} + style={{marginLeft: Metrics.icons.buttonIcon * 0.5, marginRight: Metrics.icons.buttonIcon * 0.5}} /> ); diff --git a/squarenotsquare/src/screens/styles/AppStyles.js b/squarenotsquare/src/screens/styles/AppStyles.js index f11ec28..031953c 100644 --- a/squarenotsquare/src/screens/styles/AppStyles.js +++ b/squarenotsquare/src/screens/styles/AppStyles.js @@ -112,7 +112,7 @@ export const styles = StyleSheet.create({ }, modePicker: { - width: Metrics.icons.buttonIcon, + width: Metrics.icons.buttonIcon * 2, overflow: "visible" },