1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

widget_draw: clean useless calls in corner drawing

Signed-off-by: Dave Davenport <qball@gmpclient.org>
This commit is contained in:
Nikita Zlobin 2023-07-25 00:56:50 +05:00 committed by Dave Davenport
parent 45688b0a53
commit 82f9605c30

View file

@ -336,8 +336,6 @@ void widget_draw(widget *widget, cairo_t *d) {
cairo_stroke(d); cairo_stroke(d);
} }
if (radius_tl > 0) { if (radius_tl > 0) {
distance_get_linestyle(widget->border.left, d);
cairo_set_line_width(d, 0);
double radius_outer = radius_tl + minof_tl; double radius_outer = radius_tl + minof_tl;
cairo_arc(d, margin_left + radius_outer, margin_top + radius_outer, cairo_arc(d, margin_left + radius_outer, margin_top + radius_outer,
radius_outer, -G_PI, -G_PI_2); radius_outer, -G_PI, -G_PI_2);
@ -354,8 +352,6 @@ void widget_draw(widget *widget, cairo_t *d) {
cairo_fill(d); cairo_fill(d);
} }
if (radius_tr > 0) { if (radius_tr > 0) {
distance_get_linestyle(widget->border.right, d);
cairo_set_line_width(d, 0);
double radius_outer = radius_tr + minof_tr; double radius_outer = radius_tr + minof_tr;
cairo_arc(d, widget->w - margin_right - radius_outer, cairo_arc(d, widget->w - margin_right - radius_outer,
margin_top + radius_outer, radius_outer, -G_PI_2, 0); margin_top + radius_outer, radius_outer, -G_PI_2, 0);
@ -374,8 +370,6 @@ void widget_draw(widget *widget, cairo_t *d) {
cairo_fill(d); cairo_fill(d);
} }
if (radius_br > 0) { if (radius_br > 0) {
distance_get_linestyle(widget->border.right, d);
cairo_set_line_width(d, 1);
double radius_outer = radius_br + minof_br; double radius_outer = radius_br + minof_br;
cairo_arc(d, widget->w - margin_right - radius_outer, cairo_arc(d, widget->w - margin_right - radius_outer,
widget->h - margin_bottom - radius_outer, radius_outer, 0.0, widget->h - margin_bottom - radius_outer, radius_outer, 0.0,
@ -398,8 +392,6 @@ void widget_draw(widget *widget, cairo_t *d) {
cairo_fill(d); cairo_fill(d);
} }
if (radius_bl > 0) { if (radius_bl > 0) {
distance_get_linestyle(widget->border.left, d);
cairo_set_line_width(d, 1.0);
double radius_outer = radius_bl + minof_bl; double radius_outer = radius_bl + minof_bl;
cairo_arc(d, margin_left + radius_outer, cairo_arc(d, margin_left + radius_outer,
widget->h - margin_bottom - radius_outer, radius_outer, widget->h - margin_bottom - radius_outer, radius_outer,