Permalink
Browse files

Circle battery inside icon percentage: eyes saver size

  • Loading branch information...
ezio84 authored and xlxfoxxlx committed Nov 30, 2016
1 parent ba46b24 commit 0c9aef2dee2ffca0b7701e08fc11f6be7aba2969
Showing with 6 additions and 4 deletions.
  1. +6 −4 packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
@@ -660,19 +660,21 @@ private void init() {
// Not much we can do with zero width or height, we'll get another pass later
if (mWidth <= 0 || mHeight <= 0) return;
final float widthDiv2 = mWidth / 2f;
// text size is width / 2 - 2dp for wiggle room
final float widthDiv2 = mWidth / 2f;
// text size is adjusted for just the circle battery
final float widthDivCircle = mWidth / 3f;
final float textSize;
switch(mStyle) {
case 2:
textSize = widthDiv2 - mContext.getResources().getDisplayMetrics().density / 1.3f;
textSize = widthDivCircle* 1.2f;
break;
case 5:
textSize = widthDiv2 * 1.3f;
textSize = widthDiv2 * 1.0f;
break;
default:
textSize = widthDiv2;
textSize = widthDiv2 * 0.9f;
break;
}

0 comments on commit 0c9aef2

Please sign in to comment.