useroption icon now visible again in useroption button

This commit is contained in:
osodebailar 2023-12-20 19:18:16 +01:00 committed by Milos Kozak
parent e2692f7d67
commit 1586336daf
2 changed files with 6 additions and 3 deletions

View file

@ -5,8 +5,8 @@
android:viewportHeight="24">
<path
android:pathData="M13.351,12.926c-0.137,-0.003 -0.283,0.012 -0.337,-0.17c-0.046,-0.155 0.002,-0.266 0.122,-0.366c0.628,-0.523 0.741,-1.232 0.711,-2.042c0,-0.148 0.013,-0.348 -0.002,-0.546c-0.071,-0.91 -0.785,-1.606 -1.718,-1.686c-0.845,-0.073 -1.71,0.485 -1.862,1.344c-0.184,1.039 -0.278,2.111 0.636,2.933c0.115,0.104 0.172,0.206 0.12,0.363c-0.059,0.177 -0.201,0.171 -0.34,0.169c-0.347,-0.005 -0.668,0.083 -0.97,0.249c-0.973,0.535 -1.043,1.404 -0.165,2.061c1.299,0.974 3.949,0.841 5.144,-0.257c0.471,-0.433 0.508,-0.927 0.084,-1.408C14.4,13.146 13.918,12.937 13.351,12.926zM13.572,14.889c-1.202,0.486 -2.407,0.499 -3.555,-0.158c-0.579,-0.331 -0.548,-0.663 0.046,-0.976c0.248,-0.131 0.517,-0.214 0.801,-0.195c0.348,0.024 0.636,-0.047 0.765,-0.414c0.14,-0.399 0.306,-0.823 -0.105,-1.149c-0.661,-0.524 -0.705,-1.225 -0.666,-1.98c0.039,-0.729 0.51,-1.259 1.159,-1.248c0.662,0.011 1.13,0.529 1.146,1.269c0.003,0.119 0,0.239 0,0.456c0.097,0.503 -0.086,0.988 -0.564,1.377c-0.395,0.321 -0.385,0.738 -0.235,1.187c0.15,0.448 0.477,0.542 0.89,0.506c0.039,-0.003 0.08,0.004 0.118,0.014c0.389,0.093 0.879,0.167 0.948,0.599C14.392,14.615 13.901,14.756 13.572,14.889z"
android:fillColor="?attr/userOptionColor"/>
android:fillColor="@color/userOption"/>
<path
android:pathData="M19.107,10.662H17.78c-0.15,-0.648 -0.406,-1.253 -0.749,-1.801l0.941,-0.941c0.239,-0.239 0.239,-0.626 0,-0.864l-1.027,-1.027c-0.239,-0.239 -0.626,-0.239 -0.864,0l-0.941,0.941c-0.548,-0.343 -1.154,-0.599 -1.801,-0.749V4.893c0,-0.338 -0.274,-0.611 -0.611,-0.611h-1.453c-0.338,0 -0.611,0.274 -0.611,0.611V6.22c-0.648,0.15 -1.253,0.406 -1.801,0.749L7.92,6.028c-0.239,-0.239 -0.626,-0.239 -0.864,0L6.028,7.056c-0.239,0.239 -0.239,0.626 0,0.864l0.941,0.941C6.626,9.409 6.37,10.015 6.22,10.662H4.893c-0.338,0 -0.611,0.274 -0.611,0.611v1.453c0,0.338 0.274,0.611 0.611,0.611H6.22c0.15,0.648 0.406,1.253 0.749,1.801L6.028,16.08c-0.239,0.239 -0.239,0.626 0,0.864l1.027,1.027c0.239,0.239 0.626,0.239 0.864,0l0.941,-0.941c0.548,0.343 1.154,0.599 1.801,0.749v1.328c0,0.338 0.274,0.611 0.611,0.611h1.453c0.338,0 0.611,-0.274 0.611,-0.611V17.78c0.648,-0.15 1.254,-0.406 1.801,-0.749l0.941,0.941c0.239,0.239 0.626,0.239 0.864,0l1.027,-1.027c0.239,-0.239 0.239,-0.626 0,-0.864l-0.941,-0.941c0.343,-0.548 0.599,-1.154 0.749,-1.801h1.328c0.338,0 0.611,-0.274 0.611,-0.611v-1.453C19.719,10.936 19.445,10.662 19.107,10.662zM12,16.938c-2.723,0 -4.938,-2.215 -4.938,-4.938S9.277,7.063 12,7.063S16.938,9.277 16.938,12S14.723,16.938 12,16.938z"
android:fillColor="?attr/userOptionColor"/>
android:fillColor="@color/userOption"/>
</vector>

View file

@ -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()