Cloudef / bemenu

Dynamic menu library and client program inspired by dmenu
GNU General Public License v3.0
1.22k stars 94 forks source link

Add rounded corners/Border radius(Addresses issue #319) #323

Closed merrittlj closed 1 year ago

merrittlj commented 1 year ago

Added the command line option "-R" to specify border radius, default 0/no curved borders. Going off of the issue I was unsure if to make the colors outside the radius transparent or not(Edits/Another PR is welcome to add this, hopefully I explained the problem).

I was unsure exactly what to write for the common.c description of the option, suggestions are welcome.

Note: Increasing the border radius too high with a little border size will cause some overlapping issues with the border.

Closes #319

merrittlj commented 1 year ago

On a unrelated side note, I really enjoy the project and I find it very useful, keep it up!

merrittlj commented 1 year ago

I'll look into fixing the style and calling cairo_rectangle when necessary. In addition, I might implement a scaling limit to the radius to prevent overlap.

merrittlj commented 1 year ago

I fixed the issues, but I think I will leave the radius up to the user, instead of trying to set a maximum limit on it(even though beyond it there might be overlapping issues)

merrittlj commented 1 year ago

Should be ready to merge.

Cloudef commented 1 year ago

Thanks, merged