Repository navigation
feat(ramp): Allow specifying ramp weights - #2505
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2505 +/- ##
==========================================
+ Coverage 10.07% 10.10% +0.02%
==========================================
Files 147 147
Lines 10229 10235 +6
==========================================
+ Hits 1031 1034 +3
- Misses 9198 9201 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
patrick96
left a comment
There was a problem hiding this comment.
Nice work!
I imagined this being done by calculating which ramp element to use depending on the percentage and the different weights. But your solution is so much less complex 😄
Please also mention this in the Added section of the changelog: https://github.com/polybar/polybar/blob/master/CONTRIBUTING.md#changelog
*Add test for ramp weights *[drawtypes/ramp] Implement ramp weights Simply clone `label_t` weight no. of times in the icon list This helps us not to change any of the calculations. *Fix silly bug Forgot to add a hyphen for the `weight` parameter. Co-authored-by: Patrick Ziegler <[email protected]> *doc: add #1750 to CHANGELOG
patrick96
left a comment
There was a problem hiding this comment.
Looks good now :)
Thanks a lot for contributing 🎉
Use std::make_shared.
What type of PR is this? (check all applicable)
Description
Adding weight attribute in ramps for more gradient-like behaviour.
It defines the size of the interval of the ramp stage.
Related Issues & Documents
Fixes #1750
Documentation (check all applicable)
We need to document the fact that ramps can have their weights specified for a particular stage