Skip to content

Feature/nav padding improvement#135

Merged
theovilardo merged 3 commits intomasterfrom
feature/nav-padding-improvement
Sep 9, 2025
Merged

Feature/nav padding improvement#135
theovilardo merged 3 commits intomasterfrom
feature/nav-padding-improvement

Conversation

@theovilardo
Copy link
Owner

No description provided.

This change adjusts the bottom padding of the default navigation bar to match the horizontal padding of the navbar and the mini-player.

Specifically:
- The bottom padding for the default navigation bar is now equal to its horizontal padding, in addition to the system navigation inset.
- A fallback mechanism has been added: if the base horizontal padding exceeds 30.dp, a value of 14.dp is used instead.
- The mini-player's horizontal padding is now also tied to this same logic, ensuring a consistent look and feel.
This commit fixes a bug where the `horizontalPadding` variable was defined in a scope that was not accessible to all the components that needed it, causing an "Unresolved reference" compilation error.

The variable declarations for `navBarStyle`, `baseHorizontalPadding`, and `horizontalPadding` have been moved to a higher scope within the `MainUI` composable in `MainActivity.kt`. This ensures they are accessible to both the `bottomBar` and the `UnifiedPlayerSheet`, resolving the issue and allowing the padding logic to be applied correctly and consistently.
This commit adjusts the horizontal padding of the default navigation bar and the mini-player to be symmetrical with the system's bottom navigation inset.

- The horizontal padding for the `DEFAULT` style navbar is now derived from the `systemNavBarInset`.
- A fallback to `14.dp` is used for the horizontal padding if the `systemNavBarInset` exceeds `30.dp`.
- This new horizontal padding is also applied to the mini-player to ensure visual consistency.
- This logic only applies to the `DEFAULT` style; the `FULL_WIDTH` style's padding remains unchanged.
- Redundant hardcoded padding has been removed from the `PlayerInternalNavigationBar` component.
@theovilardo theovilardo merged commit 69255d2 into master Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant