Add icons for play/background/popup from here
This commit is contained in:
parent
0347fd9bf0
commit
b50db477a1
@ -44,6 +44,9 @@ import org.schabi.newpipe.player.playqueue.ChannelTabPlayQueue
|
||||
import org.schabi.newpipe.player.playqueue.PlayQueue
|
||||
import org.schabi.newpipe.player.playqueue.PlaylistPlayQueue
|
||||
import org.schabi.newpipe.player.playqueue.SinglePlayQueue
|
||||
import org.schabi.newpipe.ui.components.menu.icons.BackgroundFromHere
|
||||
import org.schabi.newpipe.ui.components.menu.icons.PlayFromHere
|
||||
import org.schabi.newpipe.ui.components.menu.icons.PopupFromHere
|
||||
import org.schabi.newpipe.util.NavigationHelper
|
||||
import org.schabi.newpipe.util.SparseItemUtil
|
||||
import org.schabi.newpipe.util.external_communication.ShareUtils
|
||||
@ -60,8 +63,11 @@ data class LongPressAction(
|
||||
Enqueue(R.string.enqueue, Icons.Default.AddToQueue),
|
||||
EnqueueNext(R.string.enqueue_next_stream, Icons.Default.QueuePlayNext),
|
||||
Background(R.string.controls_background_title, Icons.Default.Headset),
|
||||
BackgroundFromHere(R.string.background_from_here, Icons.Default.BackgroundFromHere),
|
||||
Popup(R.string.controls_popup_title, Icons.Default.PictureInPicture),
|
||||
PopupFromHere(R.string.popup_from_here, Icons.Default.PopupFromHere),
|
||||
Play(R.string.play, Icons.Default.PlayArrow),
|
||||
PlayFromHere(R.string.play_from_here, Icons.Default.PlayFromHere),
|
||||
PlayWithKodi(R.string.play_with_kodi_title, Icons.Default.Cast),
|
||||
Download(R.string.download, Icons.Default.Download),
|
||||
AddToPlaylist(R.string.add_to_playlist, Icons.AutoMirrored.Default.PlaylistAdd),
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
@file:Suppress("UnusedReceiverParameter")
|
||||
|
||||
package org.schabi.newpipe.ui.components.menu.icons
|
||||
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
* Obtained by combining Filled.Headset and Filled.PlaylistPlay
|
||||
*/
|
||||
val Icons.Filled.BackgroundFromHere: ImageVector by lazy {
|
||||
materialIcon(name = "Filled.HeadsetPlus") {
|
||||
materialPath {
|
||||
moveTo(7.200f, 0.000f)
|
||||
curveToRelative(-3.976f, 0.000f, -7.200f, 3.224f, -7.200f, 7.200f)
|
||||
verticalLineToRelative(5.600f)
|
||||
curveToRelative(0.000f, 1.328f, 1.072f, 2.400f, 2.400f, 2.400f)
|
||||
horizontalLineToRelative(2.400f)
|
||||
verticalLineToRelative(-6.400f)
|
||||
horizontalLineTo(1.600f)
|
||||
verticalLineToRelative(-1.600f)
|
||||
curveToRelative(0.000f, -3.096f, 2.504f, -5.600f, 5.600f, -5.600f)
|
||||
reflectiveCurveToRelative(5.600f, 2.504f, 5.600f, 5.600f)
|
||||
verticalLineToRelative(1.600f)
|
||||
horizontalLineToRelative(-3.200f)
|
||||
verticalLineToRelative(6.400f)
|
||||
horizontalLineToRelative(2.400f)
|
||||
curveToRelative(1.328f, 0.000f, 2.400f, -1.072f, 2.400f, -2.400f)
|
||||
verticalLineToRelative(-5.600f)
|
||||
curveToRelative(0.000f, -3.976f, -3.224f, -7.200f, -7.200f, -7.200f)
|
||||
close()
|
||||
}
|
||||
materialPath {
|
||||
moveTo(15.817f, 16.202f)
|
||||
lineToRelative(-0.916f, 0.916f)
|
||||
lineToRelative(2.977f, 2.983f)
|
||||
lineToRelative(-2.977f, 2.983f)
|
||||
lineToRelative(0.916f, 0.916f)
|
||||
lineToRelative(3.900f, -3.900f)
|
||||
close()
|
||||
}
|
||||
materialPath {
|
||||
moveTo(20.100f, 16.202f)
|
||||
lineToRelative(-0.916f, 0.916f)
|
||||
lineToRelative(2.977f, 2.983f)
|
||||
lineToRelative(-2.977f, 2.983f)
|
||||
lineToRelative(0.916f, 0.916f)
|
||||
lineToRelative(3.900f, -3.900f)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true, backgroundColor = 0xFFFFFFFF)
|
||||
@Composable
|
||||
private fun BackgroundFromHerePreview() {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.BackgroundFromHere,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(240.dp),
|
||||
)
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
@file:Suppress("UnusedReceiverParameter")
|
||||
|
||||
package org.schabi.newpipe.ui.components.menu.icons
|
||||
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
* Obtained by combining Filled.PlayArrow and Filled.PlaylistPlay
|
||||
*/
|
||||
val Icons.Filled.PlayFromHere: ImageVector by lazy {
|
||||
materialIcon(name = "Filled.HeadsetPlus") {
|
||||
materialPath {
|
||||
moveTo(5.000f, 3.000f)
|
||||
verticalLineToRelative(11.200f)
|
||||
lineToRelative(8.800f, -5.600f)
|
||||
close()
|
||||
}
|
||||
materialPath {
|
||||
moveTo(15.817f, 16.202f)
|
||||
lineToRelative(-0.916f, 0.916f)
|
||||
lineToRelative(2.977f, 2.983f)
|
||||
lineToRelative(-2.977f, 2.983f)
|
||||
lineToRelative(0.916f, 0.916f)
|
||||
lineToRelative(3.900f, -3.900f)
|
||||
close()
|
||||
}
|
||||
materialPath {
|
||||
moveTo(20.100f, 16.202f)
|
||||
lineToRelative(-0.916f, 0.916f)
|
||||
lineToRelative(2.977f, 2.983f)
|
||||
lineToRelative(-2.977f, 2.983f)
|
||||
lineToRelative(0.916f, 0.916f)
|
||||
lineToRelative(3.900f, -3.900f)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true, backgroundColor = 0xFFFFFFFF)
|
||||
@Composable
|
||||
private fun PlayFromHerePreview() {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.PlayFromHere,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(240.dp),
|
||||
)
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
@file:Suppress("UnusedReceiverParameter")
|
||||
|
||||
package org.schabi.newpipe.ui.components.menu.icons
|
||||
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
* Obtained by combining Filled.PictureInPicture and Filled.PlaylistPlay
|
||||
*/
|
||||
val Icons.Filled.PopupFromHere: ImageVector by lazy {
|
||||
materialIcon(name = "Filled.HeadsetPlus") {
|
||||
materialPath {
|
||||
moveTo(14.320f, 3.200f)
|
||||
horizontalLineToRelative(-6.400f)
|
||||
verticalLineToRelative(4.800f)
|
||||
horizontalLineToRelative(6.400f)
|
||||
lineTo(14.320f, 3.200f)
|
||||
close()
|
||||
moveTo(15.920f, 0.000f)
|
||||
lineTo(1.520f, 0.000f)
|
||||
curveToRelative(-0.880f, 0.000f, -1.600f, 0.720f, -1.600f, 1.600f)
|
||||
verticalLineToRelative(11.200f)
|
||||
curveToRelative(0.000f, 0.880f, 0.720f, 1.584f, 1.600f, 1.584f)
|
||||
horizontalLineToRelative(14.400f)
|
||||
curveToRelative(0.880f, 0.000f, 1.600f, -0.704f, 1.600f, -1.584f)
|
||||
lineTo(17.520f, 1.600f)
|
||||
curveToRelative(0.000f, -0.880f, -0.720f, -1.600f, -1.600f, -1.600f)
|
||||
close()
|
||||
moveTo(15.920f, 12.808f)
|
||||
lineTo(1.520f, 12.808f)
|
||||
lineTo(1.520f, 1.584f)
|
||||
horizontalLineToRelative(14.400f)
|
||||
verticalLineToRelative(11.224f)
|
||||
close()
|
||||
}
|
||||
materialPath {
|
||||
moveTo(15.817f, 16.202f)
|
||||
lineToRelative(-0.916f, 0.916f)
|
||||
lineToRelative(2.977f, 2.983f)
|
||||
lineToRelative(-2.977f, 2.983f)
|
||||
lineToRelative(0.916f, 0.916f)
|
||||
lineToRelative(3.900f, -3.900f)
|
||||
close()
|
||||
}
|
||||
materialPath {
|
||||
moveTo(20.100f, 16.202f)
|
||||
lineToRelative(-0.916f, 0.916f)
|
||||
lineToRelative(2.977f, 2.983f)
|
||||
lineToRelative(-2.977f, 2.983f)
|
||||
lineToRelative(0.916f, 0.916f)
|
||||
lineToRelative(3.900f, -3.900f)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true, backgroundColor = 0xFFFFFFFF)
|
||||
@Composable
|
||||
private fun PopupFromHerePreview() {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.PopupFromHere,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(240.dp),
|
||||
)
|
||||
}
|
||||
@ -900,4 +900,7 @@
|
||||
<string name="youtube_player_http_403">HTTP error 403 received from server while playing, likely caused by an IP ban or streaming URL deobfuscation issues</string>
|
||||
<string name="sign_in_confirm_not_bot_error">%1$s refused to provide data, asking for a login to confirm the requester is not a bot.\n\nYour IP might have been temporarily banned by %1$s, you can wait some time or switch to a different IP (for example by turning on/off a VPN, or by switching from WiFi to mobile data).</string>
|
||||
<string name="unsupported_content_in_country">This content is not available for the currently selected content country.\n\nChange your selection from \"Settings > Content > Default content country\".</string>
|
||||
<string name="background_from_here">Background\nfrom here</string>
|
||||
<string name="popup_from_here">Popup\nfrom here</string>
|
||||
<string name="play_from_here">Play\nfrom here</string>
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user