From 62d775b78efc80a554afc93e3acce55477d66c72 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 24 Mar 2018 17:09:56 +0100 Subject: [PATCH] DEV warning only for APS builds --- .../main/java/info/nightscout/androidaps/MainApp.java | 2 ++ .../java/info/nightscout/androidaps/db/Treatment.java | 2 +- .../graphExtensions/PointsWithLabelGraphSeries.java | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index f9fa7480cd..8a114bcc13 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -389,6 +389,8 @@ public class MainApp extends Application { } public static boolean isEngineeringModeOrRelease() { + if (!BuildConfig.APS) + return true; return engineeringMode || !devBranch; } diff --git a/app/src/main/java/info/nightscout/androidaps/db/Treatment.java b/app/src/main/java/info/nightscout/androidaps/db/Treatment.java index 4b4bfcb08d..63c91bd111 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/Treatment.java +++ b/app/src/main/java/info/nightscout/androidaps/db/Treatment.java @@ -149,7 +149,7 @@ public class Treatment implements DataPointWithLabelInterface { @Override public float getSize() { - return 10; + return 2; } @Override diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java index 0051518bb4..4fa7e8c55f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/graphExtensions/PointsWithLabelGraphSeries.java @@ -52,7 +52,7 @@ public class PointsWithLabelGraphSeries e // Convert the sp to pixels Context context = MainApp.instance().getApplicationContext(); float scaledTextSize = spSize * context.getResources().getDisplayMetrics().scaledDensity; - float scaledPxSize = context.getResources().getDisplayMetrics().scaledDensity * 1.5f; + float scaledPxSize = context.getResources().getDisplayMetrics().scaledDensity * 2.8f; /** * choose a predefined shape to render for @@ -233,9 +233,10 @@ public class PointsWithLabelGraphSeries e } else if (value.getShape() == Shape.SMB) { mPaint.setStrokeWidth(2); Point[] points = new Point[3]; - points[0] = new Point((int)endX, (int)(endY-value.getSize())); - points[1] = new Point((int)(endX+value.getSize()), (int)(endY+value.getSize()*0.67)); - points[2] = new Point((int)(endX-value.getSize()), (int)(endY+value.getSize()*0.67)); + float size = value.getSize() * scaledPxSize; + points[0] = new Point((int)endX, (int)(endY-size)); + points[1] = new Point((int)(endX+size), (int)(endY+size*0.67)); + points[2] = new Point((int)(endX-size), (int)(endY+size*0.67)); mPaint.setStyle(Paint.Style.FILL_AND_STROKE); drawArrows(points, canvas, mPaint); } else if (value.getShape() == Shape.EXTENDEDBOLUS) {