diff --git a/core/embed/rust/src/ui/model_mercury/component/homescreen.rs b/core/embed/rust/src/ui/model_mercury/component/homescreen.rs index 06a3cbb4c..e09e0b71c 100644 --- a/core/embed/rust/src/ui/model_mercury/component/homescreen.rs +++ b/core/embed/rust/src/ui/model_mercury/component/homescreen.rs @@ -354,8 +354,8 @@ impl Component for Lockscreen { } fn render<'s>(&'s self, target: &mut impl Renderer<'s>) { - const OVERLAY_SIZE: i16 = 170; - const OVERLAY_BORDER: i16 = (AREA.height() - OVERLAY_SIZE) / 2; + const OVERLAY_RADIUS: i16 = 85; + const OVERLAY_BORDER: i16 = (AREA.height() / 2) - OVERLAY_RADIUS; const OVERLAY_OFFSET: i16 = 9; let center = AREA.center(); @@ -369,7 +369,7 @@ impl Component for Lockscreen { .with_bg(Color::black()) .render(target); - shape::Bar::new(AREA.split_bottom(OVERLAY_BORDER - OVERLAY_OFFSET).1) + shape::Bar::new(AREA.split_bottom(OVERLAY_BORDER - OVERLAY_OFFSET - 2).1) .with_bg(Color::black()) .render(target); @@ -377,7 +377,7 @@ impl Component for Lockscreen { .with_bg(Color::black()) .render(target); - shape::Bar::new(AREA.split_right(OVERLAY_BORDER).1) + shape::Bar::new(AREA.split_right(OVERLAY_BORDER - 2).1) .with_bg(Color::black()) .render(target); diff --git a/core/embed/rust/src/ui/model_mercury/cshape/unlock_overlay.rs b/core/embed/rust/src/ui/model_mercury/cshape/unlock_overlay.rs index 36dbfde06..f6285a77e 100644 --- a/core/embed/rust/src/ui/model_mercury/cshape/unlock_overlay.rs +++ b/core/embed/rust/src/ui/model_mercury/cshape/unlock_overlay.rs @@ -69,7 +69,7 @@ impl UnlockOverlay { canvas.fill_sector(center, r, 180.0 + angle, 280.0 + angle, transp); canvas.fill_circle(center, r - Self::THICKNESS, opaque, 255); - // Innner fixed circle + // Inner fixed circle let r = Self::RADIUS - (9 * Self::SPAN) / 2; canvas.fill_circle(center, r, transp, 255); canvas.fill_circle(center, r - Self::THICKNESS, opaque, 255); @@ -78,9 +78,10 @@ impl UnlockOverlay { impl<'a> Shape<'a> for UnlockOverlay { fn bounds(&self) -> Rect { + // +1 pixel because middle pixel is not counted in circle radius Rect::new( - self.pos - Offset::uniform(Self::RADIUS), - self.pos + Offset::uniform(Self::RADIUS + 1), + self.pos - Offset::uniform(Self::RADIUS + 1), + self.pos + Offset::uniform(Self::RADIUS + 2), ) }