diff --git a/app/src/main/java/info/nightscout/androidaps/Widget.kt b/app/src/main/java/info/nightscout/androidaps/Widget.kt
index 2d8268626e..e43f21e93e 100644
--- a/app/src/main/java/info/nightscout/androidaps/Widget.kt
+++ b/app/src/main/java/info/nightscout/androidaps/Widget.kt
@@ -6,6 +6,7 @@ import android.appwidget.AppWidgetProvider
import android.content.ComponentName
import android.content.Context
import android.content.Intent
+import android.graphics.Color
import android.graphics.Paint
import android.view.View
import android.widget.RemoteViews
@@ -105,7 +106,11 @@ class Widget : AppWidgetProvider() {
}
)
views.setImageViewResource(R.id.arrow, trendCalculator.getTrendArrow(overviewData.lastBg).directionToIcon())
- //binding.infoLayout.arrow.setColorFilter(overviewData.lastBgColor(context))
+ views.setInt(R.id.arrow, "setColorFilter", when {
+ overviewData.isLow -> rh.gc(R.color.low)
+ overviewData.isHigh -> rh.gc(R.color.high)
+ else -> rh.gc(R.color.inrange)
+ })
val glucoseStatus = glucoseStatusProvider.glucoseStatusData
if (glucoseStatus != null) {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt
index c7b937666e..ed72586168 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewData.kt
@@ -196,9 +196,13 @@ class OverviewData @Inject constructor(
}
} ?: R.drawable.ic_cp_basal_no_tbr
+ // will be removed if a solution of getting the right color for widget is solved
val temporaryBasalColor: Int
get() = iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { rh.gc(R.color.basal) }
- ?: rh.gc(R.color.defaulttextcolor)
+ ?: rh.gc(R.color.textAppearancemediumDark)
+
+ fun temporaryBasalColor(context: Context?): Int = iobCobCalculator.getTempBasalIncludingConvertedExtended(dateUtil.now())?.let { rh.gac(context , R.attr.basal) }
+ ?: rh.gac(context, R.attr.textAppearancemediumColor)
/*
* EXTENDED BOLUS
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt
index c14de709e8..a6f34737ed 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt
@@ -852,7 +852,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
@Suppress("UNUSED_PARAMETER")
fun updateTemporaryBasal(from: String) {
binding.infoLayout.baseBasal.text = overviewData.temporaryBasalText
- binding.infoLayout.baseBasal.setTextColor(overviewData.temporaryBasalColor)
+ binding.infoLayout.baseBasal.setTextColor(overviewData.temporaryBasalColor(context))
binding.infoLayout.baseBasalIcon.setImageResource(overviewData.temporaryBasalIcon)
binding.infoLayout.basalLayout.setOnClickListener {
activity?.let { OKDialog.show(it, rh.gs(R.string.basal), overviewData.temporaryBasalDialogText) }
diff --git a/core/src/main/res/values-night/colors.xml b/core/src/main/res/values-night/colors.xml
index f4b913e290..b12d342936 100644
--- a/core/src/main/res/values-night/colors.xml
+++ b/core/src/main/res/values-night/colors.xml
@@ -234,6 +234,9 @@
#33969696
#EBEBEA
+ #000000
+ #B3FFFFFF
+
#FFFF00
#00FFFF
diff --git a/core/src/main/res/values-night/styles.xml b/core/src/main/res/values-night/styles.xml
index b0b4a086b6..67d8b27049 100644
--- a/core/src/main/res/values-night/styles.xml
+++ b/core/src/main/res/values-night/styles.xml
@@ -225,6 +225,7 @@
- @color/activity
- @color/plastic_grey
+ - @color/textAppearancemediumDark
diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml
index c2364008d3..ce4561af52 100644
--- a/core/src/main/res/values/attrs.xml
+++ b/core/src/main/res/values/attrs.xml
@@ -205,4 +205,5 @@
+
\ No newline at end of file
diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml
index 9cebe24152..d46e136e6f 100644
--- a/core/src/main/res/values/colors.xml
+++ b/core/src/main/res/values/colors.xml
@@ -238,6 +238,9 @@
#33969696
#EBEBEA
+ #000000
+ #B3FFFFFF
+
#FFFF00
#00FFFF
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
index f1dbc5de9d..2da4b24680 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core/src/main/res/values/styles.xml
@@ -53,7 +53,7 @@
- @color/colorSetTempButton
- - @color/cardColorBackground
+ - ?attr/colorSurface
- @color/exercise
@@ -233,6 +233,7 @@
- @color/activity
- @color/plastic_grey
+ - @color/textAppearancemediumLight