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

Commit d3c0b77e authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "systemui: fix circle battery percentage alignment for low dpi devices" into cm-11.0

parents b0fde04f 624d877d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -784,9 +784,9 @@ public class BatteryMeterView extends View implements DemoMode {
            Rect bounds = new Rect();
            mTextPaint.getTextBounds("99", 0, "99".length(), bounds);
            mTextX = mCircleSize / 2.0f + getPaddingLeft();
            // the +1 at end of formula balances out rounding issues. works out on all resolutions
            mTextY = mCircleSize / 2.0f + (bounds.bottom - bounds.top) / 2.0f + bounds.bottom
                    - strokeWidth / 2.0f + 1;
            // the +1dp at end of formula balances out rounding issues.works out on all resolutions
            mTextY = mCircleSize / 2.0f + (bounds.bottom - bounds.top) / 2.0f
                    - strokeWidth / 2.0f + getResources().getDisplayMetrics().density;
        }
    }
}