Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3691049 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Improve the layout-related comments.

Bug: http://b/26548285
Change-Id: I20ae75c4ec2dc64b982a047dba498ebda029c90d
parent 2f1eedde
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -105,16 +105,18 @@ int ScreenRecoveryUI::PixelsFromDp(int dp) {

// Here's the intended layout:

//           162dp
// icon     (200dp)
//            62dp
// text      (14sp)
//            24dp
// progress   (2dp)
//           172dp
//          | regular     large
// ---------+--------------------
//          |   220dp     366dp
// icon     |  (200dp)   (200dp)
//          |    68dp      68dp
// text     |   (14sp)    (14sp)
//          |    32dp      32dp
// progress |    (2dp)     (2dp)
//          |   194dp     340dp

// Note that "baseline" is actually the *top* of each icon (because that's how our drawing
// routines work), so that's the more useful measurement.
// routines work), so that's the more useful measurement for calling code.

int ScreenRecoveryUI::GetAnimationBaseline() {
    return GetTextBaseline() - PixelsFromDp(68) - gr_get_height(loopFrames[0]);