From 1586336daf4251b545e549fb91a2c24137ff63b3 Mon Sep 17 00:00:00 2001 From: osodebailar Date: Wed, 20 Dec 2023 19:18:16 +0100 Subject: [PATCH] useroption icon now visible again in useroption button --- core/ui/src/main/res/drawable/ic_user_options.xml | 4 ++-- .../aaps/plugins/main/general/overview/OverviewFragment.kt | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/ui/src/main/res/drawable/ic_user_options.xml b/core/ui/src/main/res/drawable/ic_user_options.xml index c19c55f8bc..f65abd7139 100644 --- a/core/ui/src/main/res/drawable/ic_user_options.xml +++ b/core/ui/src/main/res/drawable/ic_user_options.xml @@ -5,8 +5,8 @@ android:viewportHeight="24"> + android:fillColor="@color/userOption"/> + android:fillColor="@color/userOption"/> diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index 382741bc69..70cd3c921e 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -618,11 +618,14 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList } it.setCompoundDrawablesWithIntrinsicBounds(null, rh.gd(app.aaps.core.ui.R.drawable.ic_user_options), null, null) it.text = event.title - it.setOnClickListener { OKDialog.showConfirmation(context, rh.gs(R.string.run_question, event.title), { handler.post { automation.processEvent(event) } }) } binding.buttonsLayout.userButtonsLayout.addView(it) + for (drawable in it.compoundDrawables ) { + drawable?.mutate() + drawable?.colorFilter = PorterDuffColorFilter(rh.gac(context, app.aaps.core.ui.R.attr.userOptionColor), PorterDuff.Mode.SRC_IN) + } } } binding.buttonsLayout.userButtonsLayout.visibility = events.isNotEmpty().toVisibility()