forge
Explore
Log in

Don't you dare go Hollow

focus-ring: Fix first frame draw of border rounded corners

Browse files at this commit

9a234265511a766bf2189c145fef67bcad4d4cdbIvan MolodetskikhParent: df6c0df
How was this a thing until now?
src/layout/focus_ring.rsmodified+2 -3
@@ -69,6 +69,7 @@ impl FocusRing {
6969 ) {
7070 let width = self.config.width;
7171 self.full_size = win_size + Size::from((width, width)).upscale(2.);
72+ self.is_border = is_border;
7273
7374 let color = if is_urgent {
7475 self.config.urgent_color
@@ -103,7 +104,7 @@ impl FocusRing {
103104 GradientRelativeTo::WorkspaceView => view_rect,
104105 };
105106
106- let rounded_corner_border_width = if self.is_border {
107+ let rounded_corner_border_width = if is_border {
107108 // HACK: increase the border width used for the inner rounded corners a tiny bit to
108109 // reduce background bleed.
109110 let extra = if self.thicken_corners { 0.5 } else { 0. };
@@ -213,8 +214,6 @@ impl FocusRing {
213214 alpha,
214215 );
215216 }
216-
217- self.is_border = is_border;
218217 }
219218
220219 pub fn render(