Widget layout issue: Unexpected padding/content inset on specific widget types

Hello everyone,

I am currently developing a suite of widgets for my iOS app using SwiftUI and WidgetKit. While the initial widgets (let's call them Widget A, B, and C) render perfectly, I am encountering a strange layout issue with a new widget (Widget D).

The Issue: On the Home Screen, Widget D appears to have an unwanted internal padding or "squeezed" content inset, even though it shares a similar structural implementation with the other functional widgets.

Technical Details:

I am using .frame(maxWidth: .infinity, maxHeight: .infinity) on the main container to ensure the content fills the available space.

Widget layout issue: Unexpected padding/content inset on specific widget types
 
 
Q