mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 23:08:14 +00:00
fix(core/rust): fix UI2 loader position
[no changelog]
This commit is contained in:
parent
72228e35cf
commit
dd823097b4
@ -119,7 +119,7 @@ impl Component for Loader {
|
|||||||
// Current loader API only takes Y-offset relative to screen center, which we
|
// Current loader API only takes Y-offset relative to screen center, which we
|
||||||
// compute from the bounds center point.
|
// compute from the bounds center point.
|
||||||
let screen_center = constant::screen().center();
|
let screen_center = constant::screen().center();
|
||||||
self.offset_y = screen_center.y - bounds.center().y;
|
self.offset_y = bounds.center().y - screen_center.y;
|
||||||
Rect::from_center_and_size(screen_center + Offset::y(self.offset_y), Self::SIZE)
|
Rect::from_center_and_size(screen_center + Offset::y(self.offset_y), Self::SIZE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user