refactor(TabBar, HomeScreen): update styles for improved UI consistency
All checks were successful
Frontend CI / build-and-push-web (push) Successful in 3m2s
Frontend CI / ota-android (push) Successful in 15m35s
Frontend CI / build-android-apk (push) Successful in 1h19m59s

- Adjusted TabBar styles for better shadow effects and padding.
- Modified HomeScreen layout margins and padding for enhanced spacing.
- Updated font weight for modernTabText to improve text visibility.
- Changed active opacity for tab interactions to enhance user experience.
This commit is contained in:
lafay
2026-03-30 18:01:32 +08:00
parent 774b5c4b47
commit 2ef267a897
2 changed files with 20 additions and 13 deletions

View File

@@ -135,26 +135,33 @@ function createTabBarStyles(colors: AppColors) {
modernContainer: {
flexDirection: 'row',
backgroundColor: colors.background.paper,
borderRadius: borderRadius.xl,
borderRadius: borderRadius['2xl'],
marginHorizontal: spacing.lg,
marginVertical: spacing.md,
marginVertical: spacing.sm,
padding: spacing.xs,
shadowColor: colors.chat.shadow,
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.08,
shadowRadius: 8,
elevation: 3,
shadowOffset: { width: 0, height: 4 },
shadowOpacity: 0.1,
shadowRadius: 16,
elevation: 6,
},
modernTab: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
paddingVertical: spacing.sm,
paddingVertical: spacing.md,
paddingHorizontal: spacing.sm,
borderRadius: borderRadius.lg,
position: 'relative',
backgroundColor: 'transparent',
},
modernTabActive: {
backgroundColor: colors.primary.main + '15',
backgroundColor: colors.primary.main + '12',
shadowColor: colors.primary.main + '20',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 8,
elevation: 3,
},
modernTabContent: {
flexDirection: 'row',
@@ -165,7 +172,7 @@ function createTabBarStyles(colors: AppColors) {
marginRight: spacing.xs,
},
modernTabText: {
fontWeight: '500',
fontWeight: '600',
fontSize: fontSizes.md,
},
modernTabTextActive: {
@@ -206,7 +213,7 @@ const TabBar: React.FC<TabBarProps> = ({
key={index}
style={[styles.modernTab, isActive && styles.modernTabActive]}
onPress={() => onTabChange(index)}
activeOpacity={0.85}
activeOpacity={0.7}
>
<View style={styles.modernTabContent}>
{icon && (

View File

@@ -67,7 +67,7 @@ function createHomeStyles(colors: AppColors) {
},
searchWrapper: {
paddingTop: spacing.lg,
paddingBottom: spacing.sm,
paddingBottom: spacing.xs,
shadowColor: 'transparent',
shadowOffset: { width: 0, height: 0 },
shadowOpacity: 0,
@@ -75,8 +75,8 @@ function createHomeStyles(colors: AppColors) {
elevation: 0,
},
homeTabBar: {
marginTop: spacing.xs,
marginBottom: spacing.sm,
marginTop: spacing.sm,
marginBottom: spacing.md,
},
viewToggleBtn: {
width: 44,