|
1 | 1 | package eu.darken.myperm.common.compose |
2 | 2 |
|
| 3 | +import androidx.compose.foundation.layout.Arrangement |
| 4 | +import androidx.compose.foundation.layout.Row |
| 5 | +import androidx.compose.foundation.layout.padding |
| 6 | +import androidx.compose.foundation.layout.size |
| 7 | +import androidx.compose.material3.Icon |
| 8 | +import androidx.compose.material3.MaterialTheme |
| 9 | +import androidx.compose.material3.Text |
| 10 | +import androidx.compose.runtime.Composable |
| 11 | +import androidx.compose.ui.Alignment |
| 12 | +import androidx.compose.ui.Modifier |
3 | 13 | import androidx.compose.ui.graphics.Color |
4 | 14 | import androidx.compose.ui.graphics.SolidColor |
5 | 15 | import androidx.compose.ui.graphics.StrokeCap |
@@ -108,3 +118,101 @@ val LucideRadar: ImageVector |
108 | 118 | } |
109 | 119 |
|
110 | 120 | private var _LucideRadar: ImageVector? = null |
| 121 | + |
| 122 | +val DiscordIcon: ImageVector |
| 123 | + get() { |
| 124 | + if (_DiscordIcon != null) return _DiscordIcon!! |
| 125 | + |
| 126 | + _DiscordIcon = ImageVector.Builder( |
| 127 | + name = "discord", |
| 128 | + defaultWidth = 24.dp, |
| 129 | + defaultHeight = 24.dp, |
| 130 | + viewportWidth = 24f, |
| 131 | + viewportHeight = 24f |
| 132 | + ).apply { |
| 133 | + path( |
| 134 | + fill = SolidColor(Color.Black), |
| 135 | + ) { |
| 136 | + moveTo(20.317f, 4.37f) |
| 137 | + arcToRelative(19.791f, 19.791f, 0f, false, false, -4.885f, -1.515f) |
| 138 | + arcToRelative(0.074f, 0.074f, 0f, false, false, -0.079f, 0.037f) |
| 139 | + curveToRelative(-0.211f, 0.375f, -0.445f, 0.865f, -0.608f, 1.25f) |
| 140 | + arcToRelative(18.27f, 18.27f, 0f, false, false, -5.487f, 0f) |
| 141 | + curveToRelative(-0.164f, -0.393f, -0.406f, -0.874f, -0.618f, -1.25f) |
| 142 | + arcToRelative(0.077f, 0.077f, 0f, false, false, -0.079f, -0.037f) |
| 143 | + arcToRelative(19.736f, 19.736f, 0f, false, false, -4.885f, 1.515f) |
| 144 | + arcToRelative(0.07f, 0.07f, 0f, false, false, -0.032f, 0.028f) |
| 145 | + curveTo(0.533f, 9.046f, -0.319f, 13.58f, 0.099f, 18.058f) |
| 146 | + arcToRelative(0.082f, 0.082f, 0f, false, false, 0.031f, 0.056f) |
| 147 | + curveToRelative(2.053f, 1.508f, 4.041f, 2.423f, 5.993f, 3.03f) |
| 148 | + arcToRelative(0.078f, 0.078f, 0f, false, false, 0.084f, -0.028f) |
| 149 | + curveToRelative(0.462f, -0.63f, 0.873f, -1.295f, 1.226f, -1.994f) |
| 150 | + arcToRelative(0.076f, 0.076f, 0f, false, false, -0.042f, -0.106f) |
| 151 | + arcToRelative(13.107f, 13.107f, 0f, false, true, -1.872f, -0.892f) |
| 152 | + arcToRelative(0.077f, 0.077f, 0f, false, true, -0.008f, -0.128f) |
| 153 | + curveToRelative(0.126f, -0.094f, 0.252f, -0.192f, 0.372f, -0.291f) |
| 154 | + arcToRelative(0.074f, 0.074f, 0f, false, true, 0.078f, -0.01f) |
| 155 | + curveToRelative(3.928f, 1.793f, 8.18f, 1.793f, 12.062f, 0f) |
| 156 | + arcToRelative(0.074f, 0.074f, 0f, false, true, 0.078f, 0.01f) |
| 157 | + curveToRelative(0.12f, 0.099f, 0.246f, 0.198f, 0.373f, 0.292f) |
| 158 | + arcToRelative(0.077f, 0.077f, 0f, false, true, -0.007f, 0.128f) |
| 159 | + arcToRelative(12.299f, 12.299f, 0f, false, true, -1.873f, 0.891f) |
| 160 | + arcToRelative(0.077f, 0.077f, 0f, false, false, -0.041f, 0.107f) |
| 161 | + curveToRelative(0.36f, 0.698f, 0.772f, 1.363f, 1.225f, 1.993f) |
| 162 | + arcToRelative(0.076f, 0.076f, 0f, false, false, 0.084f, 0.029f) |
| 163 | + curveToRelative(1.961f, -0.607f, 3.95f, -1.522f, 6.002f, -3.029f) |
| 164 | + arcToRelative(0.077f, 0.077f, 0f, false, false, 0.031f, -0.055f) |
| 165 | + curveToRelative(0.5f, -5.177f, -0.838f, -9.674f, -3.549f, -13.66f) |
| 166 | + arcToRelative(0.061f, 0.061f, 0f, false, false, -0.031f, -0.029f) |
| 167 | + close() |
| 168 | + moveTo(8.02f, 15.331f) |
| 169 | + curveToRelative(-1.183f, 0f, -2.157f, -1.086f, -2.157f, -2.419f) |
| 170 | + curveToRelative(0f, -1.333f, 0.956f, -2.419f, 2.157f, -2.419f) |
| 171 | + curveToRelative(1.21f, 0f, 2.176f, 1.095f, 2.157f, 2.419f) |
| 172 | + curveToRelative(0f, 1.333f, -0.956f, 2.419f, -2.157f, 2.419f) |
| 173 | + close() |
| 174 | + moveTo(15.995f, 15.331f) |
| 175 | + curveToRelative(-1.182f, 0f, -2.157f, -1.086f, -2.157f, -2.419f) |
| 176 | + curveToRelative(0f, -1.333f, 0.955f, -2.419f, 2.157f, -2.419f) |
| 177 | + curveToRelative(1.21f, 0f, 2.176f, 1.095f, 2.157f, 2.419f) |
| 178 | + curveToRelative(0f, 1.333f, -0.946f, 2.419f, -2.157f, 2.419f) |
| 179 | + close() |
| 180 | + } |
| 181 | + }.build() |
| 182 | + |
| 183 | + return _DiscordIcon!! |
| 184 | + } |
| 185 | + |
| 186 | +private var _DiscordIcon: ImageVector? = null |
| 187 | + |
| 188 | +@Composable |
| 189 | +private fun IconPreviewRow(icon: ImageVector, label: String) { |
| 190 | + Row( |
| 191 | + verticalAlignment = Alignment.CenterVertically, |
| 192 | + horizontalArrangement = Arrangement.spacedBy(12.dp), |
| 193 | + modifier = Modifier.padding(8.dp), |
| 194 | + ) { |
| 195 | + Icon( |
| 196 | + imageVector = icon, |
| 197 | + contentDescription = null, |
| 198 | + modifier = Modifier.size(24.dp), |
| 199 | + tint = MaterialTheme.colorScheme.onSurface, |
| 200 | + ) |
| 201 | + Text( |
| 202 | + text = label, |
| 203 | + style = MaterialTheme.typography.bodyMedium, |
| 204 | + ) |
| 205 | + } |
| 206 | +} |
| 207 | + |
| 208 | +@Preview2 |
| 209 | +@Composable |
| 210 | +private fun LucideRadarPreview() = PreviewWrapper { |
| 211 | + IconPreviewRow(LucideRadar, "LucideRadar") |
| 212 | +} |
| 213 | + |
| 214 | +@Preview2 |
| 215 | +@Composable |
| 216 | +private fun DiscordIconPreview() = PreviewWrapper { |
| 217 | + IconPreviewRow(DiscordIcon, "DiscordIcon") |
| 218 | +} |
0 commit comments