Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add padding to View component #931

Merged
merged 2 commits into from
Jan 30, 2025
Merged

Add padding to View component #931

merged 2 commits into from
Jan 30, 2025

Conversation

noituri
Copy link
Member

@noituri noituri commented Jan 27, 2025

Snapshot tests: membraneframework-labs/video_compositor_snapshot_tests#52

The padding behavior:

  • Static children:
    • If the size is defined for the child, grow the child's size by its padding, and offset its position with parent padding
    • If the size is not defined, shrink the child to accommodate the parent's padding, and offset its position with the parent's padding
  • Absolute children:
    • If the size is defined for the child, grow the child's size by its padding
    • Parent padding does not affect its absolute children

Closes #926

@noituri noituri requested review from wkozyra95 and BrtqKr and removed request for wkozyra95 January 27, 2025 11:50
@noituri noituri force-pushed the @noituri/add-padding branch from a4f2181 to 1e9848e Compare January 27, 2025 12:17
@noituri noituri force-pushed the @noituri/add-padding branch from 1e9848e to 67d3378 Compare January 27, 2025 12:22
compositor_api/src/types/component.rs Show resolved Hide resolved
compositor_render/src/scene/view_component/layout.rs Outdated Show resolved Hide resolved
compositor_render/src/scene/layout.rs Outdated Show resolved Hide resolved
compositor_render/src/scene/layout.rs Outdated Show resolved Hide resolved
@noituri noituri force-pushed the @noituri/add-padding branch from bb380a1 to 33c1eae Compare January 29, 2025 13:57
@noituri noituri requested a review from wkozyra95 January 29, 2025 14:03
@noituri noituri force-pushed the @noituri/add-padding branch 6 times, most recently from 5227608 to 3d67e1f Compare January 30, 2025 13:55
@noituri noituri force-pushed the @noituri/add-padding branch from 3d67e1f to de0c7f7 Compare January 30, 2025 14:49
@noituri noituri force-pushed the @noituri/add-padding branch from de0c7f7 to 855c3f1 Compare January 30, 2025 15:31
@noituri noituri merged commit cc736b2 into master Jan 30, 2025
5 checks passed
@noituri noituri deleted the @noituri/add-padding branch January 30, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add padding to view component
2 participants