Skip to content

Bug: safeAreaPadding API not working correctly #511

@Kyle-Ye

Description

@Kyle-Ye

Bug Report

Description

The API is not working correctly in OpenSwiftUI compared to SwiftUI.

Reproduction Code

struct ContentView: View {
    var body: some View {
        Color.red
            .safeAreaPadding(.init(top: 10, leading: 20, bottom: 30, trailing: 40))
    }
}

Expected Behavior

Should apply safe area padding with the specified EdgeInsets values (top: 10, leading: 20, bottom: 30, trailing: 40).

Actual Behavior

The safe area padding is not applied correctly in OpenSwiftUI.

Screenshots

  • SwiftUI
Image
  • OpenSwiftUI:

Change the Color.clear to blue and green to better reflect it

Image

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedPR contribution is appreciated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions