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

Notch.max based on the height of the overlay content #25

Open
kushsolitary opened this issue Dec 22, 2021 · 4 comments
Open

Notch.max based on the height of the overlay content #25

kushsolitary opened this issue Dec 22, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@kushsolitary
Copy link

Hello,

Is there a way to set the max notch of the overlay to the height of the content inside the overlay?

@gaetanzanella
Copy link
Collaborator

gaetanzanella commented Jan 3, 2022

Hi @kushsolitary, no you can't. But it could be implemented, we just need to add a case to NotchDimension.

enum NotchReference {
    case parent, overlay
}

extension NotchDimension {

    /// Creates a dimension that is computed as a fraction of the height of the passed reference.
    static func fractional(_ value: Double, reference: NotchReference = .parent) -> NotchDimension
}

@gaetanzanella gaetanzanella added the enhancement New feature or request label Jan 3, 2022
@ZachJiroun
Copy link

Hi, are there any plans to add this?

@gaetanzanella
Copy link
Collaborator

gaetanzanella commented Feb 13, 2023

Hi @ZachJiroun, unfortunately I didn't take the time to implement it.
Would you like to try? :)
It shouldn't be too hard. The hardest part is the testing.

@ZachJiroun
Copy link

I'll give it a try 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants