JDStatusBarNotification icon indicating copy to clipboard operation
JDStatusBarNotification copied to clipboard

Provide a customizable corner radius (for custom views / SwiftUI views)

Open Sankar-1804 opened this issue 11 months ago • 8 comments

Hi, When my customView's/SwiftUI view's height get increased the pill looks like a large capsule. Instead i want the pill to look like a rectangle with rounded corners.

Sankar-1804 avatar Feb 04 '25 09:02 Sankar-1804

~~You can control the corner radius by modifying the style.~~

calimarkus avatar Feb 04 '25 21:02 calimarkus

You mean style.statusBarView.layer.cornerRadius ? If so, the statusBarView is not exposed to modify it.

Sankar-1804 avatar Feb 05 '25 05:02 Sankar-1804

Sorry, I was mistaken. This is currently fixed to be height / 2.0, as setup here:

https://github.com/calimarkus/JDStatusBarNotification/blob/main/JDStatusBarNotification/Private/NotificationView.swift#L431-L434

For the custom view it's applied as a layer mask:

https://github.com/calimarkus/JDStatusBarNotification/blob/main/JDStatusBarNotification/Private/NotificationView.swift#L386C8-L391

The above happens in every layout pass, so you can't override it. So what you wish for is a new feature request - a customizable corner radius.

calimarkus avatar Feb 05 '25 15:02 calimarkus

Yes, thank you so much for the detailed response. It would be great if you incorporate the change to the library. And also, is there any update on the queue feature?

Sankar-1804 avatar Feb 05 '25 17:02 Sankar-1804

Hello @calimarkus! I may have a question regarding the positioning of the notificationMsgView, can I display it at the bottom of the screen instead of at the top? Is there a modifier that would help me do that instantly? Thanks in advance!

Raidansz avatar Feb 06 '25 20:02 Raidansz

@Raidansz please see https://github.com/calimarkus/JDStatusBarNotification/issues/135

calimarkus avatar Feb 06 '25 21:02 calimarkus

@calimarkus Thank you very much!

Raidansz avatar Feb 06 '25 21:02 Raidansz

Hi @calimarkus, just checking in to see if there’s any update on the feature request I mentioned earlier. Do you have an estimated timeline for when it might be implemented?

Sankar-1804 avatar Feb 09 '25 17:02 Sankar-1804