1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00

fix(core/rust): fix UI2 loader position

[no changelog]
This commit is contained in:
tychovrahe 2022-08-25 22:33:04 +02:00 committed by TychoVrahe
parent 72228e35cf
commit dd823097b4

View File

@ -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)
} }