Update poll icons from Compound (#1849)

* Use compound icons for polls

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Marco Romano
2023-11-22 13:35:04 +01:00
committed by GitHub
parent 6441c54c8b
commit 202173c8e3
21 changed files with 53 additions and 52 deletions

2
changelog.d/1849.misc Normal file
View File

@@ -0,0 +1,2 @@
Update poll icons from Compound

View File

@@ -36,5 +36,5 @@ sealed class TimelineItemAction(
data object Edit : TimelineItemAction(CommonStrings.action_edit, CommonDrawables.ic_edit_outline)
data object ViewSource : TimelineItemAction(CommonStrings.action_view_source, CommonDrawables.ic_developer_options)
data object ReportContent : TimelineItemAction(CommonStrings.action_report_content, CommonDrawables.ic_compound_chat_problem, destructive = true)
data object EndPoll : TimelineItemAction(CommonStrings.action_end_poll, CommonDrawables.ic_poll_end)
data object EndPoll : TimelineItemAction(CommonStrings.action_end_poll, CommonDrawables.ic_compound_polls_end)
}

View File

@@ -125,7 +125,7 @@ private fun PollTitle(
) {
if (isPollEnded) {
Icon(
resourceId = CommonDrawables.ic_poll_end,
resourceId = CommonDrawables.ic_compound_polls_end,
contentDescription = stringResource(id = CommonStrings.a11y_poll_end),
modifier = Modifier.size(22.dp)
)

View File

@@ -69,6 +69,7 @@ internal val iconsCompound = listOf(
R.drawable.ic_compound_overflow_horizontal,
R.drawable.ic_compound_overflow_vertical,
R.drawable.ic_compound_polls,
R.drawable.ic_compound_polls_end,
R.drawable.ic_compound_pop_out,
R.drawable.ic_compound_public,
R.drawable.ic_compound_search,
@@ -121,7 +122,6 @@ internal val iconsOther = listOf(
R.drawable.ic_new_message,
R.drawable.ic_numbered_list,
R.drawable.ic_plus,
R.drawable.ic_poll_end,
R.drawable.ic_quote,
R.drawable.ic_reply,
R.drawable.ic_send,

View File

@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M18.7 7.7l4-4c0.4-0.38 0.4-1.02 0-1.4-0.38-0.4-1.02-0.4-1.4 0L18 5.58l-1.3-1.3c-0.38-0.39-1.02-0.39-1.4 0-0.4 0.4-0.4 1.03 0 1.42l2 2c0.38 0.39 1.02 0.39 1.4 0Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M21 19v-8.34C20.37 10.88 19.7 11 19 11v8H5V5h8c0-0.7 0.12-1.37 0.34-2H5C4.45 3 3.98 3.2 3.59 3.59 3.19 3.98 3 4.45 3 5v14c0 0.55 0.2 1.02 0.59 1.41C3.98 20.81 4.45 21 5 21h14c0.55 0 1.02-0.2 1.41-0.59C20.81 20.02 21 19.55 21 19Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M8 17c0.28 0 0.52-0.1 0.71-0.29C8.91 16.52 9 16.28 9 16v-5c0-0.28-0.1-0.52-0.29-0.71C8.52 10.09 8.28 10 8 10c-0.28 0-0.52 0.1-0.71 0.29C7.09 10.48 7 10.72 7 11v5c0 0.28 0.1 0.52 0.29 0.71C7.48 16.91 7.72 17 8 17Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M12 17c0.28 0 0.52-0.1 0.71-0.29C12.91 16.52 13 16.28 13 16V8c0-0.28-0.1-0.52-0.29-0.71C12.52 7.09 12.28 7 12 7c-0.28 0-0.52 0.1-0.71 0.29C11.09 7.48 11 7.72 11 8v8c0 0.28 0.1 0.52 0.29 0.71C11.48 16.91 11.72 17 12 17Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M16 17c0.28 0 0.52-0.1 0.71-0.29C16.91 16.52 17 16.28 17 16v-2c0-0.28-0.1-0.52-0.29-0.71C16.52 13.09 16.28 13 16 13c-0.28 0-0.52 0.1-0.71 0.29C15.09 13.48 15 13.72 15 14v2c0 0.28 0.1 0.52 0.29 0.71C15.48 16.91 15.72 17 16 17Z"/>
</vector>

View File

@@ -1,21 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
<path
android:pathData="M17.148,7.065L20.815,3.399C21.173,3.041 21.173,2.46 20.815,2.102C20.457,1.744 19.876,1.744 19.518,2.102L16.5,5.121L15.315,3.936C14.957,3.578 14.377,3.578 14.019,3.936C13.66,4.294 13.66,4.874 14.019,5.232L15.852,7.065C16.21,7.423 16.79,7.423 17.148,7.065Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M19.25,17.417V9.771C18.677,9.974 18.059,10.084 17.417,10.084V17.417H4.583V4.584L11.917,4.584C11.917,3.941 12.027,3.324 12.23,2.751H4.583C4.079,2.751 3.648,2.93 3.289,3.289C2.93,3.648 2.75,4.08 2.75,4.584V17.417C2.75,17.921 2.93,18.353 3.289,18.712C3.648,19.071 4.079,19.251 4.583,19.251H17.417C17.921,19.251 18.352,19.071 18.712,18.712C19.07,18.353 19.25,17.921 19.25,17.417Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M7.333,15.584C7.593,15.584 7.811,15.496 7.986,15.32C8.162,15.145 8.25,14.927 8.25,14.667V10.084C8.25,9.824 8.162,9.607 7.986,9.431C7.811,9.255 7.593,9.167 7.333,9.167C7.074,9.167 6.856,9.255 6.68,9.431C6.505,9.607 6.417,9.824 6.417,10.084V14.667C6.417,14.927 6.505,15.145 6.68,15.32C6.856,15.496 7.074,15.584 7.333,15.584Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M11,15.584C11.26,15.584 11.477,15.496 11.653,15.32C11.829,15.145 11.917,14.927 11.917,14.667V7.334C11.917,7.074 11.829,6.857 11.653,6.681C11.477,6.505 11.26,6.417 11,6.417C10.74,6.417 10.523,6.505 10.347,6.681C10.171,6.857 10.083,7.074 10.083,7.334V14.667C10.083,14.927 10.171,15.145 10.347,15.32C10.523,15.496 10.74,15.584 11,15.584Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M14.667,15.584C14.926,15.584 15.144,15.496 15.32,15.32C15.495,15.145 15.583,14.927 15.583,14.667V12.834C15.583,12.574 15.495,12.357 15.32,12.181C15.144,12.005 14.926,11.917 14.667,11.917C14.407,11.917 14.189,12.005 14.014,12.181C13.838,12.357 13.75,12.574 13.75,12.834V14.667C13.75,14.927 13.838,15.145 14.014,15.32C14.189,15.496 14.407,15.584 14.667,15.584Z"
android:fillColor="@android:color/white"/>
</vector>

View File

@@ -25,7 +25,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.GraphicEq
import androidx.compose.material.icons.outlined.Image
import androidx.compose.material.icons.outlined.Poll
import androidx.compose.material.icons.outlined.VideoCameraBack
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
@@ -125,7 +124,7 @@ fun AttachmentThumbnail(
}
AttachmentThumbnailType.Poll -> {
Icon(
imageVector = Icons.Outlined.Poll,
resourceId = CommonDrawables.ic_compound_polls,
contentDescription = info.textContent,
)
}