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

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

Open
Sankar-1804 opened this issue Feb 4, 2025 · 8 comments

Comments

@Sankar-1804
Copy link

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.

@calimarkus
Copy link
Owner

calimarkus commented Feb 4, 2025

You can control the corner radius by modifying the style.

@Sankar-1804
Copy link
Author

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

@calimarkus
Copy link
Owner

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 calimarkus changed the title Not able to present a rectangular view in pill style. Provide a customizable corner radius (for custom views / SwiftUI views) Feb 5, 2025
@Sankar-1804
Copy link
Author

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?

@Raidansz
Copy link

Raidansz commented Feb 6, 2025

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!

@calimarkus
Copy link
Owner

calimarkus commented Feb 6, 2025

@Raidansz please see #135

@Raidansz
Copy link

Raidansz commented Feb 6, 2025

@calimarkus Thank you very much!

@Sankar-1804
Copy link
Author

Sankar-1804 commented Feb 9, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants