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

View File

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