focus-ring: Fix first frame draw of border rounded corners
Browse files at this commit9a234265511a766bf2189c145fef67bcad4d4cdbParent: df6c0df1 changed file +2 -3
- src/layout/focus_ring.rs +2 -3
src/layout/focus_ring.rsmodified+2 -3
| @@ -69,6 +69,7 @@ impl FocusRing { | |||
| 69 | ) { | 69 | ) { |
| 70 | let width = self.config.width; | 70 | let width = self.config.width; |
| 71 | self.full_size = win_size + Size::from((width, width)).upscale(2.); | 71 | self.full_size = win_size + Size::from((width, width)).upscale(2.); |
| 72 | + self.is_border = is_border; | ||
| 72 | 73 | ||
| 73 | let color = if is_urgent { | 74 | let color = if is_urgent { |
| 74 | self.config.urgent_color | 75 | self.config.urgent_color |
| @@ -103,7 +104,7 @@ impl FocusRing { | |||
| 103 | GradientRelativeTo::WorkspaceView => view_rect, | 104 | GradientRelativeTo::WorkspaceView => view_rect, |
| 104 | }; | 105 | }; |
| 105 | 106 | ||
| 106 | - let rounded_corner_border_width = if self.is_border { | 107 | + let rounded_corner_border_width = if is_border { |
| 107 | // HACK: increase the border width used for the inner rounded corners a tiny bit to | 108 | // HACK: increase the border width used for the inner rounded corners a tiny bit to |
| 108 | // reduce background bleed. | 109 | // reduce background bleed. |
| 109 | let extra = if self.thicken_corners { 0.5 } else { 0. }; | 110 | let extra = if self.thicken_corners { 0.5 } else { 0. }; |
| @@ -213,8 +214,6 @@ impl FocusRing { | |||
| 213 | alpha, | 214 | alpha, |
| 214 | ); | 215 | ); |
| 215 | } | 216 | } |
| 216 | - | ||
| 217 | - self.is_border = is_border; | ||
| 218 | } | 217 | } |
| 219 | 218 | ||
| 220 | pub fn render( | 219 | pub fn render( |