New icons for Poll and Poll end (#1280)

Now both icons come from our designs and have a consistent size and padding (previously the poll one was coming from the material icons).
This commit is contained in:
Marco Romano
2023-09-12 13:35:26 +02:00
committed by GitHub
parent 29bbb0bfc4
commit aa67dfb17a
18 changed files with 57 additions and 42 deletions

View File

@@ -35,5 +35,5 @@ sealed class TimelineItemAction(
data object Edit : TimelineItemAction(CommonStrings.action_edit, VectorIcons.Edit)
data object Developer : TimelineItemAction(CommonStrings.action_view_source, VectorIcons.DeveloperMode)
data object ReportContent : TimelineItemAction(CommonStrings.action_report_content, VectorIcons.ReportContent, destructive = true)
data object EndPoll : TimelineItemAction(CommonStrings.action_end_poll, VectorIcons.EndPoll)
data object EndPoll : TimelineItemAction(CommonStrings.action_end_poll, VectorIcons.PollEnd)
}

View File

@@ -24,8 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Poll
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@@ -86,13 +84,13 @@ internal fun PollTitle(
) {
if (isPollEnded) {
Icon(
resourceId = VectorIcons.EndPoll,
resourceId = VectorIcons.PollEnd,
contentDescription = null,
modifier = Modifier.size(22.dp)
)
} else {
Icon(
imageVector = Icons.Outlined.Poll,
resourceId = VectorIcons.Poll,
contentDescription = null,
modifier = Modifier.size(22.dp)
)

View File

@@ -27,7 +27,8 @@ object VectorIcons {
val ReportContent = R.drawable.ic_report_content
val Groups = R.drawable.ic_groups
val Share = R.drawable.ic_share
val EndPoll = R.drawable.ic_poll_end
val Poll = R.drawable.ic_poll
val PollEnd = R.drawable.ic_poll_end
val Bold = R.drawable.ic_bold
val BulletList = R.drawable.ic_bullet_list
val CodeBlock = R.drawable.ic_code_block

View File

@@ -0,0 +1,9 @@
<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="M7.333,15.583C7.593,15.583 7.811,15.495 7.986,15.32C8.162,15.144 8.25,14.926 8.25,14.667V10.083C8.25,9.824 8.162,9.606 7.986,9.43C7.811,9.255 7.593,9.167 7.333,9.167C7.074,9.167 6.856,9.255 6.68,9.43C6.505,9.606 6.417,9.824 6.417,10.083V14.667C6.417,14.926 6.505,15.144 6.68,15.32C6.856,15.495 7.074,15.583 7.333,15.583ZM11,15.583C11.26,15.583 11.477,15.495 11.653,15.32C11.829,15.144 11.917,14.926 11.917,14.667V7.333C11.917,7.074 11.829,6.856 11.653,6.68C11.477,6.505 11.26,6.417 11,6.417C10.74,6.417 10.523,6.505 10.347,6.68C10.171,6.856 10.083,7.074 10.083,7.333V14.667C10.083,14.926 10.171,15.144 10.347,15.32C10.523,15.495 10.74,15.583 11,15.583ZM14.667,15.583C14.926,15.583 15.144,15.495 15.32,15.32C15.495,15.144 15.583,14.926 15.583,14.667V12.833C15.583,12.574 15.495,12.356 15.32,12.18C15.144,12.005 14.926,11.917 14.667,11.917C14.407,11.917 14.189,12.005 14.014,12.18C13.838,12.356 13.75,12.574 13.75,12.833V14.667C13.75,14.926 13.838,15.144 14.014,15.32C14.189,15.495 14.407,15.583 14.667,15.583ZM4.583,19.25C4.079,19.25 3.648,19.07 3.289,18.712C2.93,18.352 2.75,17.921 2.75,17.417V4.583C2.75,4.079 2.93,3.648 3.289,3.289C3.648,2.93 4.079,2.75 4.583,2.75H17.417C17.921,2.75 18.352,2.93 18.712,3.289C19.07,3.648 19.25,4.079 19.25,4.583V17.417C19.25,17.921 19.07,18.352 18.712,18.712C18.352,19.07 17.921,19.25 17.417,19.25H4.583ZM4.583,17.417H17.417V4.583H4.583V17.417Z"
android:fillColor="#1B1D22"/>
</vector>

View File

@@ -1,14 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="19dp"
android:viewportWidth="20"
android:viewportHeight="19">
android:width="22dp"
android:height="22dp"
android:viewportWidth="22"
android:viewportHeight="22">
<path
android:pathData="M18,8.659V17C18,17.55 17.804,18.021 17.413,18.413C17.021,18.804 16.55,19 16,19H2C1.45,19 0.979,18.804 0.587,18.413C0.196,18.021 0,17.55 0,17V3C0,2.45 0.196,1.979 0.587,1.587C0.979,1.196 1.45,1 2,1H10.341C10.12,1.626 10,2.299 10,3L2,3V17H16V9C16.701,9 17.374,8.88 18,8.659ZM5.713,14.712C5.521,14.904 5.283,15 5,15C4.717,15 4.479,14.904 4.287,14.712C4.096,14.521 4,14.283 4,14V9C4,8.717 4.096,8.479 4.287,8.288C4.479,8.096 4.717,8 5,8C5.283,8 5.521,8.096 5.713,8.288C5.904,8.479 6,8.717 6,9V14C6,14.283 5.904,14.521 5.713,14.712ZM9.712,14.712C9.521,14.904 9.283,15 9,15C8.717,15 8.479,14.904 8.288,14.712C8.096,14.521 8,14.283 8,14V6C8,5.717 8.096,5.479 8.288,5.287C8.479,5.096 8.717,5 9,5C9.283,5 9.521,5.096 9.712,5.287C9.904,5.479 10,5.717 10,6V14C10,14.283 9.904,14.521 9.712,14.712ZM13.712,14.712C13.521,14.904 13.283,15 13,15C12.717,15 12.479,14.904 12.288,14.712C12.096,14.521 12,14.283 12,14V12C12,11.717 12.096,11.479 12.288,11.288C12.479,11.096 12.717,11 13,11C13.283,11 13.521,11.096 13.712,11.288C13.904,11.479 14,11.717 14,12V14C14,14.283 13.904,14.521 13.712,14.712Z"
android:fillColor="#1B1D22"
android:fillType="evenOdd"/>
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="#1B1D22"/>
<path
android:pathData="M19.707,0.293C20.098,0.683 20.098,1.317 19.707,1.707L15.707,5.707C15.317,6.098 14.683,6.098 14.293,5.707L12.293,3.707C11.902,3.317 11.902,2.683 12.293,2.293C12.683,1.902 13.317,1.902 13.707,2.293L15,3.586L18.293,0.293C18.683,-0.098 19.317,-0.098 19.707,0.293Z"
android:fillColor="#1B1D22"
android:fillType="evenOdd"/>
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="#1B1D22"/>
<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="#1B1D22"/>
<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="#1B1D22"/>
<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="#1B1D22"/>
</vector>