@@ -79,10 +79,9 @@ void background_widget::render(ui::nanovg_context ctx) {
7979 auto &theme = config::current->context_menu .theme ;
8080 bool light = is_light_mode ();
8181
82- bool use_self_drawn_border = theme.use_self_drawn_border ;
83-
84- float boarder_width = use_self_drawn_border ? theme.border_width : 0 .0f ;
85- if (use_self_drawn_border) {
82+ float border_width = theme.border_width ;
83+ // Draw shadow and border
84+ {
8685 float shadow_size = theme.shadow_size ,
8786 shadow_offset_x = theme.shadow_offset_x ,
8887 shadow_offset_y = theme.shadow_offset_y ;
@@ -107,13 +106,13 @@ void background_widget::render(ui::nanovg_context ctx) {
107106
108107 ctx.beginPath ();
109108 if (theme.inset_border ) {
110- ctx.roundedRect (*x + boarder_width / 2 , *y + boarder_width / 2 ,
111- *width - boarder_width , *height - boarder_width ,
109+ ctx.roundedRect (*x + border_width / 2 , *y + border_width / 2 ,
110+ *width - border_width , *height - border_width ,
112111 corner_radius);
113112 } else {
114113 ctx.roundedRect (*x, *y, *width, *height, corner_radius);
115114 }
116- ctx.strokeWidth (boarder_width );
115+ ctx.strokeWidth (border_width );
117116 auto border_color =
118117 light ? theme.border_color_light : theme.border_color_dark ;
119118 border_color.apply_to_ctx (ctx, *x, *y, *width, *height);
@@ -125,9 +124,9 @@ void background_widget::render(ui::nanovg_context ctx) {
125124 auto cl = nvgRGBAf (0 , 0 , 0 , 1 - *opacity / 255 .f );
126125 ctx.fillColor (cl);
127126 if (theme.inset_border )
128- ctx.fillRoundedRect (*x + boarder_width , *y + boarder_width ,
129- *width - boarder_width * 2 ,
130- *height - boarder_width * 2 , *radius);
127+ ctx.fillRoundedRect (*x + border_width , *y + border_width ,
128+ *width - border_width * 2 ,
129+ *height - border_width * 2 , *radius);
131130 else
132131 ctx.fillRoundedRect (*x, *y, *width, *height, *radius);
133132 }
0 commit comments