Added rounded corners option for progress bar#1119
Conversation
fwsmit
left a comment
There was a problem hiding this comment.
Thank you for making this PR. It looks pretty good. I've added a few comments. The main thing is that you need to check if the lines of the progress bar are not blurry. This is because of the way cairo draws lines.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1119 +/- ##
==========================================
- Coverage 65.26% 65.25% -0.01%
==========================================
Files 46 46
Lines 7358 7362 +4
==========================================
+ Hits 4802 4804 +2
- Misses 2556 2558 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@vlfldr would you mind finishing this PR? |
|
@fwsmit Sorry for the delay. Just want to clarify, when you say "With whole number scaling it should work like this" in a comment above do you mean it should work as-is with the parameters changed to floats, or it should work by rounding to the nearest .5? I am going to hold off on passing the frame width to draw_rounded_rect to support fractional scaling for now as it would involved either overloading or touching more of the codebase than this PR intended to. |
It should work as is. You can best check this by setting the progress bar width to 1 and seeing if the progress bar border is a nice 1-pixel line and not a blurry multi-pixel line. I've tested it and it works great.
Okay that's fine |
|
After you address the open comment it's good |
…s with information regarding potential blurry lines.
|
Thanks! This is a great addition to dunst. I'll go ahead and merge it |
This PR adds the option
progress_bar_corner_radiusto enable rounded corners on the progress bar. If its value is non-zero,draw_rounded_rectis used in place ofdraw_rectto render the bar. Please let me know if anything needs to be changed!