forge
Explore
Log in

Don't you dare go Hollow

layout/tile: Fade out focus ring for fullscreen

Browse files at this commit

1cede8922f29af8a7e60c46ee6e516112c9ee1aaIvan MolodetskikhParent: 80c22b8
src/layout/tile.rsmodified+5 -2
@@ -466,7 +466,7 @@ impl<W: LayoutElement> Tile<W> {
466 view_rect,466 view_rect,
467 radius,467 radius,
468 self.scale,468 self.scale,
469- 1.,469+ 1. - fullscreen_progress as f32,
470 );470 );
471 471
472 self.fullscreen_backdrop.resize(animated_tile_size);472 self.fullscreen_backdrop.resize(animated_tile_size);
@@ -1187,7 +1187,10 @@ impl<W: LayoutElement> Tile<W> {
1187 });1187 });
1188 let rv = rv.chain(elem.into_iter().flatten());1188 let rv = rv.chain(elem.into_iter().flatten());
1189 1189
1190- let elem = focus_ring.then(|| self.focus_ring.render(renderer, location).map(Into::into));1190+ // Hide the focus ring when fullscreened. It's not normally visible anyway due to being
1191+ // outside the monitor, but it is visible in the overview (which is a bit weird).
1192+ let elem = (focus_ring && fullscreen_progress < 1.)
1193+ .then(|| self.focus_ring.render(renderer, location).map(Into::into));
1191 let rv = rv.chain(elem.into_iter().flatten());1194 let rv = rv.chain(elem.into_iter().flatten());
1192 1195
1193 rv.chain(self.shadow.render(renderer, location).map(Into::into))1196 rv.chain(self.shadow.render(renderer, location).map(Into::into))