fix textcolor for highlighted online status button

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-02-24 22:26:04 +01:00
parent 305ceedc75
commit b7b92eb623
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
3 changed files with 13 additions and 5 deletions

View File

@ -355,24 +355,25 @@ class SetStatusDialogFragment :
} }
private fun visualizeStatus(statusType: StatusType) { private fun visualizeStatus(statusType: StatusType) {
clearTopStatus()
when (statusType) { when (statusType) {
StatusType.ONLINE -> { StatusType.ONLINE -> {
clearTopStatus()
binding.onlineStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary)) binding.onlineStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
StatusType.AWAY -> { StatusType.AWAY -> {
clearTopStatus()
binding.awayStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary)) binding.awayStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
StatusType.DND -> { StatusType.DND -> {
clearTopStatus()
binding.dndStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary)) binding.dndStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.dndHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
StatusType.INVISIBLE -> { StatusType.INVISIBLE -> {
clearTopStatus()
binding.invisibleStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary)) binding.invisibleStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.invisibleHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
else -> clearTopStatus() else -> Log.d(logTag, "unknown status")
} }
} }
@ -383,6 +384,11 @@ class SetStatusDialogFragment :
binding.awayStatus.setBackgroundColor(grey) binding.awayStatus.setBackgroundColor(grey)
binding.dndStatus.setBackgroundColor(grey) binding.dndStatus.setBackgroundColor(grey)
binding.invisibleStatus.setBackgroundColor(grey) binding.invisibleStatus.setBackgroundColor(grey)
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
binding.dndHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
binding.invisibleHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
} }
} }

View File

@ -38,6 +38,7 @@
<color name="high_emphasis_text">#deffffff</color> <color name="high_emphasis_text">#deffffff</color>
<color name="medium_emphasis_text">#99ffffff</color> <color name="medium_emphasis_text">#99ffffff</color>
<color name="low_emphasis_text">#61ffffff</color> <color name="low_emphasis_text">#61ffffff</color>
<color name="high_emphasis_text_inverse">#de000000</color>
<color name="bg_default">#121212</color> <color name="bg_default">#121212</color>
<color name="bg_default_semitransparent">#99121212</color> <color name="bg_default_semitransparent">#99121212</color>

View File

@ -39,6 +39,7 @@
<color name="high_emphasis_text">#de000000</color> <color name="high_emphasis_text">#de000000</color>
<color name="medium_emphasis_text">#99000000</color> <color name="medium_emphasis_text">#99000000</color>
<color name="low_emphasis_text">#61000000</color> <color name="low_emphasis_text">#61000000</color>
<color name="high_emphasis_text_inverse">#deffffff</color>
<!-- general text colors for dark background --> <!-- general text colors for dark background -->
<color name="high_emphasis_text_dark_background">#deffffff</color> <color name="high_emphasis_text_dark_background">#deffffff</color>