Theme rework WIP

This commit is contained in:
Benoit Marty
2019-06-05 14:31:11 +02:00
parent 91114e2afe
commit 51f5594ea0
33 changed files with 243 additions and 127 deletions

View File

@ -45,9 +45,9 @@ object AvatarRenderer {
private const val THUMBNAIL_SIZE = 250
private val AVATAR_COLOR_LIST = listOf(
R.color.avatar_color_1,
R.color.avatar_color_2,
R.color.avatar_color_3
R.color.riotx_avatar_fill_1,
R.color.riotx_avatar_fill_2,
R.color.riotx_avatar_fill_3
)
@UiThread

View File

@ -23,7 +23,7 @@ import im.vector.riotredesign.R
@ColorRes
fun getColorFromUserId(userId: String?): Int {
if (userId.isNullOrBlank()) {
return R.color.username_1
return R.color.riotx_username_1
}
var hash = 0
@ -37,13 +37,13 @@ fun getColorFromUserId(userId: String?): Int {
}
return when (Math.abs(hash) % 8 + 1) {
1 -> R.color.username_1
2 -> R.color.username_2
3 -> R.color.username_3
4 -> R.color.username_4
5 -> R.color.username_5
6 -> R.color.username_6
7 -> R.color.username_7
else -> R.color.username_8
1 -> R.color.riotx_username_1
2 -> R.color.riotx_username_2
3 -> R.color.riotx_username_3
4 -> R.color.riotx_username_4
5 -> R.color.riotx_username_5
6 -> R.color.riotx_username_6
7 -> R.color.riotx_username_7
else -> R.color.riotx_username_8
}
}