From 096aa008bc0e44b1b50994918eda84e7ba9905c0 Mon Sep 17 00:00:00 2001 From: Philoul Date: Wed, 9 Dec 2020 20:59:43 +0100 Subject: [PATCH] New TempTarget icons Refactor to delete redundant icons --- .../actions/ActionStartTempTarget.kt | 2 +- .../res/drawable/ic_actions_temptarget.xml | 9 ----- .../main/res/drawable/ic_cp_cgm_target.xml | 9 ----- .../main/res/drawable/ic_temptarget_flat.xml | 12 ++++++ .../main/res/drawable/ic_temptarget_high.xml | 12 ++++++ .../main/res/drawable/ic_temptarget_low.xml | 12 ++++++ app/src/main/res/layout/actions_fragment.xml | 2 +- .../res/layout/actions_fragment_lowres.xml | 2 +- app/src/main/res/layout/dialog_temptarget.xml | 2 +- .../actions/ActionStartTempTargetTest.kt | 2 +- icons/temptarget_flat.svg | 40 +++++++++++++++++++ icons/temptarget_high.svg | 26 ++++++++++++ icons/temptarget_low.svg | 25 ++++++++++++ 13 files changed, 132 insertions(+), 23 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_actions_temptarget.xml delete mode 100644 app/src/main/res/drawable/ic_cp_cgm_target.xml create mode 100644 app/src/main/res/drawable/ic_temptarget_flat.xml create mode 100644 app/src/main/res/drawable/ic_temptarget_high.xml create mode 100644 app/src/main/res/drawable/ic_temptarget_low.xml create mode 100644 icons/temptarget_flat.svg create mode 100644 icons/temptarget_high.svg create mode 100644 icons/temptarget_low.svg diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStartTempTarget.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStartTempTarget.kt index 812a572df9..30f51b9966 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStartTempTarget.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionStartTempTarget.kt @@ -37,7 +37,7 @@ class ActionStartTempTarget(injector: HasAndroidInjector) : Action(injector) { override fun friendlyName(): Int = R.string.starttemptarget override fun shortDescription(): String = resourceHelper.gs(R.string.starttemptarget) + ": " + tt().friendlyDescription(value.units, resourceHelper) - @DrawableRes override fun icon(): Int = R.drawable.ic_cp_cgm_target + @DrawableRes override fun icon(): Int = R.drawable.ic_temptarget_high override fun doAction(callback: Callback) { activePlugin.activeTreatments.addToHistoryTempTarget(tt()) diff --git a/app/src/main/res/drawable/ic_actions_temptarget.xml b/app/src/main/res/drawable/ic_actions_temptarget.xml deleted file mode 100644 index 5dbd5d8b0c..0000000000 --- a/app/src/main/res/drawable/ic_actions_temptarget.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_cp_cgm_target.xml b/app/src/main/res/drawable/ic_cp_cgm_target.xml deleted file mode 100644 index e708ea5bdd..0000000000 --- a/app/src/main/res/drawable/ic_cp_cgm_target.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_temptarget_flat.xml b/app/src/main/res/drawable/ic_temptarget_flat.xml new file mode 100644 index 0000000000..bf1a2492a1 --- /dev/null +++ b/app/src/main/res/drawable/ic_temptarget_flat.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_temptarget_high.xml b/app/src/main/res/drawable/ic_temptarget_high.xml new file mode 100644 index 0000000000..9fbfe2eb08 --- /dev/null +++ b/app/src/main/res/drawable/ic_temptarget_high.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_temptarget_low.xml b/app/src/main/res/drawable/ic_temptarget_low.xml new file mode 100644 index 0000000000..a161fd12f4 --- /dev/null +++ b/app/src/main/res/drawable/ic_temptarget_low.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/layout/actions_fragment.xml b/app/src/main/res/layout/actions_fragment.xml index 427000813d..98e3976d97 100644 --- a/app/src/main/res/layout/actions_fragment.xml +++ b/app/src/main/res/layout/actions_fragment.xml @@ -45,7 +45,7 @@ style="@style/ButtonSmallFontStyle" android:layout_width="0dp" android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_actions_temptarget" + android:drawableTop="@drawable/ic_temptarget_high" android:paddingLeft="0dp" android:paddingRight="0dp" android:text="@string/careportal_temporarytarget" diff --git a/app/src/main/res/layout/actions_fragment_lowres.xml b/app/src/main/res/layout/actions_fragment_lowres.xml index dc7a4fc204..bf90751f8d 100644 --- a/app/src/main/res/layout/actions_fragment_lowres.xml +++ b/app/src/main/res/layout/actions_fragment_lowres.xml @@ -45,7 +45,7 @@ style="@style/ButtonSmallFontStyle" android:layout_width="0dp" android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_actions_temptarget" + android:drawableTop="@drawable/ic_temptarget_high" android:paddingLeft="0dp" android:paddingRight="0dp" android:text="@string/careportal_temporarytarget" diff --git a/app/src/main/res/layout/dialog_temptarget.xml b/app/src/main/res/layout/dialog_temptarget.xml index ee95db3f67..f770f8ba98 100644 --- a/app/src/main/res/layout/dialog_temptarget.xml +++ b/app/src/main/res/layout/dialog_temptarget.xml @@ -26,7 +26,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/careportal_temporarytarget" - app:srcCompat="@drawable/ic_actions_temptarget" /> + app:srcCompat="@drawable/ic_temptarget_high" /> + + + + + + + diff --git a/icons/temptarget_high.svg b/icons/temptarget_high.svg new file mode 100644 index 0000000000..283cd4d821 --- /dev/null +++ b/icons/temptarget_high.svg @@ -0,0 +1,26 @@ + + + + + + + diff --git a/icons/temptarget_low.svg b/icons/temptarget_low.svg new file mode 100644 index 0000000000..1a9344c534 --- /dev/null +++ b/icons/temptarget_low.svg @@ -0,0 +1,25 @@ + + + + + + +