DynamicOverlay icon indicating copy to clipboard operation
DynamicOverlay copied to clipboard

Notch.max based on the height of the overlay content

Open kushsolitary opened this issue 3 years ago • 4 comments

Hello,

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

kushsolitary avatar Dec 22 '21 09:12 kushsolitary

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 avatar Jan 03 '22 13:01 gaetanzanella

Hi, are there any plans to add this?

ZachJiroun avatar Feb 13 '23 05:02 ZachJiroun

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.

gaetanzanella avatar Feb 13 '23 08:02 gaetanzanella

I'll give it a try 😄

ZachJiroun avatar Feb 13 '23 18:02 ZachJiroun