Skip to content

Conversation

zappolowski
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

A new set of configuration options are added to allow to set corner radii
separately. For motivation see #2294.

Additionally to the already present radius and radius-{bottom,top}
radius-{bottom,top}-{left,right} configuration options are added. If not
present they fall back to radius-bottom, radius-top or ultimately radius
to preserve current semantics.

Related Issues & Documents

This implements #2294.

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
    See provided patch below (to be applied to Home → Configuration).
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes
--- configuration_old.md	2020-12-13 16:33:34.677959229 +0100
+++ configuration_new.md	2020-12-13 16:38:17.929004974 +0100
@@ -201,8 +201,10 @@
 ; Note: This shouldn't be used together with border-size because the border 
 ; doesn't get rounded. For this to work you may also need to enable 
 ; pseudo-transparency or use a compositor like compton.
-; Individual top/bottom values can be defined using:
-;   radius-{top,bottom}
+; Individual top/bottom-left/right values can be defined using:
+;   radius-{top,bottom}-{left,right}
+; In case radius-{top,bottom} is provided, it is applied to {left,right}. If
+; just radius is provided its value is used for all corners.
 radius = 0.0
 
 ; Under-/overline pixel size and argb color

@codecov
Copy link

codecov bot commented Dec 13, 2020

Codecov Report

Merging #2297 (f748501) into master (7493639) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2297      +/-   ##
=========================================
- Coverage    7.39%   7.39%   -0.01%     
=========================================
  Files         157     157              
  Lines       10814   10818       +4     
=========================================
  Hits          800     800              
- Misses      10014   10018       +4     
Flag Coverage Δ
unittests 7.39% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/cairo/context.hpp 0.00% <0.00%> (ø)
include/components/types.hpp 0.00% <0.00%> (ø)
src/components/bar.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7493639...f748501. Read the comment docs.

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work perfectly. Thanks a lot!

@patrick96 patrick96 merged commit 7c662ec into polybar:master Dec 13, 2020
@zappolowski zappolowski deleted the feature/configuration-for-all-corner-radii branch December 13, 2020 16:14
@mausworks
Copy link

Hey, awesome work, looking forward to this! When is this planned to be released? 👍

@patrick96
Copy link
Member

3.6.0 has no release date yet

@h45h74x h45h74x mentioned this pull request Jan 19, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants