From 2b40cfe80fde2731f6a0e0822b94cc5c6addb8eb Mon Sep 17 00:00:00 2001 From: b3ni15 Date: Sun, 21 Dec 2025 00:32:31 +0100 Subject: [PATCH] feat: enhance Seat, TableBackground, TableMarkings, and TableScreen components for improved styling and layout adjustments --- src/components/Seat.js | 29 +++++++++++++++++------------ src/components/TableBackground.js | 19 ++++++++++--------- src/components/TableMarkings.js | 4 ++-- src/screens/TableScreen.js | 20 ++++++++++---------- 4 files changed, 39 insertions(+), 33 deletions(-) diff --git a/src/components/Seat.js b/src/components/Seat.js index a53ce92..55777c9 100644 --- a/src/components/Seat.js +++ b/src/components/Seat.js @@ -6,7 +6,7 @@ export default function Seat({ seat, highlight }) { const isEmpty = !seat.username; return ( - + {isEmpty ? 'Üres hely' : seat.username} {seat.bet > 0 ? `${seat.bet} Ft` : 'TÉT'} @@ -36,11 +36,16 @@ export default function Seat({ seat, highlight }) { const styles = StyleSheet.create({ seat: { - padding: 8, - borderRadius: 12, - backgroundColor: 'rgba(0,0,0,0.2)', + padding: 6, + borderRadius: 10, + backgroundColor: 'rgba(0,0,0,0.18)', borderWidth: 1, - borderColor: 'rgba(255,255,255,0.08)' + borderColor: 'rgba(255,255,255,0.08)', + alignItems: 'center' + }, + emptySeat: { + backgroundColor: 'rgba(0,0,0,0.12)', + borderColor: 'rgba(255,255,255,0.12)' }, highlight: { borderColor: colors.goldBright, @@ -50,23 +55,23 @@ const styles = StyleSheet.create({ }, name: { color: colors.text, - fontSize: 12, + fontSize: 10, fontFamily: fonts.body, fontWeight: '600' }, betBox: { - marginTop: 6, - alignSelf: 'flex-start', - paddingHorizontal: 8, - paddingVertical: 4, - borderRadius: 6, + marginTop: 4, + alignSelf: 'center', + paddingHorizontal: 6, + paddingVertical: 3, + borderRadius: 5, borderWidth: 1, borderColor: colors.gold, backgroundColor: 'rgba(0,0,0,0.15)' }, betLabel: { color: colors.goldBright, - fontSize: 11, + fontSize: 10, fontFamily: fonts.mono }, hand: { diff --git a/src/components/TableBackground.js b/src/components/TableBackground.js index 97d98cf..74e841e 100644 --- a/src/components/TableBackground.js +++ b/src/components/TableBackground.js @@ -27,24 +27,25 @@ export default function TableBackground({ children, style }) { const styles = StyleSheet.create({ wrapper: { + flex: 1, width: '100%', padding: 0 }, edge: { flex: 1, - borderTopLeftRadius: 60, - borderTopRightRadius: 60, + borderTopLeftRadius: 12, + borderTopRightRadius: 12, borderBottomLeftRadius: 280, borderBottomRightRadius: 280, padding: 6 }, felt: { flex: 1, - borderTopLeftRadius: 48, - borderTopRightRadius: 48, + borderTopLeftRadius: 8, + borderTopRightRadius: 8, borderBottomLeftRadius: 260, borderBottomRightRadius: 260, - padding: 14, + padding: 12, overflow: 'hidden' }, innerRing: { @@ -55,9 +56,9 @@ const styles = StyleSheet.create({ right: 16, borderWidth: 2, borderColor: 'rgba(255,255,255,0.15)', - borderTopLeftRadius: 40, - borderTopRightRadius: 40, - borderBottomLeftRadius: 240, - borderBottomRightRadius: 240 + borderTopLeftRadius: 6, + borderTopRightRadius: 6, + borderBottomLeftRadius: 230, + borderBottomRightRadius: 230 } }); diff --git a/src/components/TableMarkings.js b/src/components/TableMarkings.js index d837ceb..ab0b90c 100644 --- a/src/components/TableMarkings.js +++ b/src/components/TableMarkings.js @@ -24,7 +24,7 @@ export default function TableMarkings() { const styles = StyleSheet.create({ container: { position: 'absolute', - top: 58, + top: 42, left: 0, right: 0, alignItems: 'center' @@ -32,7 +32,7 @@ const styles = StyleSheet.create({ title: { color: colors.goldBright, fontFamily: fonts.display, - fontSize: 14, + fontSize: 13, letterSpacing: 2 }, subtitle: { diff --git a/src/screens/TableScreen.js b/src/screens/TableScreen.js index 5c6beb4..4e137f6 100644 --- a/src/screens/TableScreen.js +++ b/src/screens/TableScreen.js @@ -226,7 +226,7 @@ const styles = StyleSheet.create({ }, tableWrap: { flex: 1, - justifyContent: 'center', + justifyContent: 'flex-start', alignItems: 'center', marginTop: 8, marginBottom: 8, @@ -256,8 +256,8 @@ const styles = StyleSheet.create({ }, seatSpot: { position: 'absolute', - width: 110, - transform: [{ translateX: -55 }] + width: 96, + transform: [{ translateX: -48 }] }, controlsOverlay: { position: 'absolute', @@ -327,11 +327,11 @@ const styles = StyleSheet.create({ }); const seatPositions = { - 0: { left: '10%', top: '50%' }, - 1: { left: '24%', top: '44%' }, - 2: { left: '38%', top: '38%' }, - 3: { left: '50%', top: '36%' }, - 4: { left: '62%', top: '38%' }, - 5: { left: '76%', top: '44%' }, - 6: { left: '90%', top: '50%' } + 0: { left: '8%', top: '62%' }, + 1: { left: '22%', top: '55%' }, + 2: { left: '36%', top: '50%' }, + 3: { left: '50%', top: '48%' }, + 4: { left: '64%', top: '50%' }, + 5: { left: '78%', top: '55%' }, + 6: { left: '92%', top: '62%' } };