chore: build
This commit is contained in:
1 parent
9a51cf7bc3
commit
57c4af4cde
98 files changed
+3042
-198
No files matched your search
@@ -155,8 +155,8 @@ dependencies {
|
|||||||
// ViewModel Compose
|
// ViewModel Compose
|
||||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||||
|
|
||||||
// Material Icons Extended
|
// Material Icons Core
|
||||||
implementation(libs.androidx.material.icons.extended)
|
implementation(libs.androidx.material.icons.core)
|
||||||
|
|
||||||
// Coil for image loading
|
// Coil for image loading
|
||||||
implementation(libs.coil.compose)
|
implementation(libs.coil.compose)
|
||||||
|
|||||||
Vendored
-3
@@ -32,6 +32,3 @@
|
|||||||
-keepclasseswithmembernames class * {
|
-keepclasseswithmembernames class * {
|
||||||
native <methods>;
|
native <methods>;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Keep LutRecipe and its components for AI JSON parsing
|
|
||||||
-keep class com.hinnka.mycamera.lut.creator.** { *; }
|
|
||||||
@@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.*
|
|||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
import androidx.compose.material.icons.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.AutoAwesome
|
|
||||||
import androidx.compose.material.icons.filled.CheckCircle
|
import androidx.compose.material.icons.filled.CheckCircle
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
@@ -27,6 +26,7 @@ import androidx.compose.ui.graphics.asImageBitmap
|
|||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import com.hinnka.mycamera.R
|
import com.hinnka.mycamera.R
|
||||||
import com.hinnka.mycamera.ui.components.PaymentDialog
|
import com.hinnka.mycamera.ui.components.PaymentDialog
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
private data class LocalImagePairDraft(
|
private data class LocalImagePairDraft(
|
||||||
val sourceUri: Uri,
|
val sourceUri: Uri,
|
||||||
@@ -373,7 +373,7 @@ fun LutCreatorScreen(
|
|||||||
) {
|
) {
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.AutoAwesome,
|
imageVector = AppIcons.AutoAwesome,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.size(48.dp),
|
modifier = Modifier.size(48.dp),
|
||||||
tint = Color(0xFFE5A324)
|
tint = Color(0xFFE5A324)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.hinnka.mycamera.lut.creator
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
|
import androidx.annotation.Keep
|
||||||
import com.hinnka.mycamera.BuildConfig
|
import com.hinnka.mycamera.BuildConfig
|
||||||
import com.hinnka.mycamera.utils.PLog
|
import com.hinnka.mycamera.utils.PLog
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
@@ -496,12 +497,14 @@ Return JSON only, without markdown formatting, code blocks, or any conversationa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Keep
|
||||||
data class AiPhotoEvaluation(
|
data class AiPhotoEvaluation(
|
||||||
val overallScore: Int,
|
val overallScore: Int,
|
||||||
val scores: AiPhotoElementScores,
|
val scores: AiPhotoElementScores,
|
||||||
val summary: String
|
val summary: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Keep
|
||||||
data class AiPhotoElementScores(
|
data class AiPhotoElementScores(
|
||||||
val impact: Int,
|
val impact: Int,
|
||||||
val technicalExcellence: Int,
|
val technicalExcellence: Int,
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ import com.hinnka.mycamera.ui.components.ColorRecipePanel
|
|||||||
import com.hinnka.mycamera.ui.components.CurveChannel
|
import com.hinnka.mycamera.ui.components.CurveChannel
|
||||||
import com.hinnka.mycamera.ui.components.LutSelector
|
import com.hinnka.mycamera.ui.components.LutSelector
|
||||||
import com.hinnka.mycamera.ui.components.PaymentDialog
|
import com.hinnka.mycamera.ui.components.PaymentDialog
|
||||||
import androidx.compose.material.icons.filled.Tune
|
|
||||||
import androidx.compose.ui.graphics.SolidColor
|
import androidx.compose.ui.graphics.SolidColor
|
||||||
import com.hinnka.mycamera.ui.components.CustomSlider
|
import com.hinnka.mycamera.ui.components.CustomSlider
|
||||||
import me.saket.telephoto.zoomable.ZoomSpec
|
import me.saket.telephoto.zoomable.ZoomSpec
|
||||||
import me.saket.telephoto.zoomable.coil.ZoomableAsyncImage
|
import me.saket.telephoto.zoomable.coil.ZoomableAsyncImage
|
||||||
import me.saket.telephoto.zoomable.rememberZoomableImageState
|
import me.saket.telephoto.zoomable.rememberZoomableImageState
|
||||||
import me.saket.telephoto.zoomable.rememberZoomableState
|
import me.saket.telephoto.zoomable.rememberZoomableState
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@SuppressLint("LocalContextGetResourceValueCall")
|
@SuppressLint("LocalContextGetResourceValueCall")
|
||||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
|
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
|
||||||
@@ -478,7 +478,7 @@ fun LutSynthesisScreen(
|
|||||||
modifier = Modifier.weight(1.5f)
|
modifier = Modifier.weight(1.5f)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = "Tune Parameters",
|
contentDescription = "Tune Parameters",
|
||||||
modifier = Modifier.size(16.dp)
|
modifier = Modifier.size(16.dp)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -40,9 +40,7 @@ import androidx.compose.foundation.layout.width
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.AutoAwesome
|
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Stop
|
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
@@ -128,6 +126,7 @@ import kotlin.io.inputStream
|
|||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
import kotlin.use
|
import kotlin.use
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
class PhantomService(val context: Context) : LifecycleOwner, SavedStateRegistryOwner {
|
class PhantomService(val context: Context) : LifecycleOwner, SavedStateRegistryOwner {
|
||||||
|
|
||||||
@@ -979,7 +978,7 @@ class PhantomService(val context: Context) : LifecycleOwner, SavedStateRegistryO
|
|||||||
modifier = Modifier.size(48.dp)
|
modifier = Modifier.size(48.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.AutoAwesome,
|
imageVector = AppIcons.AutoAwesome,
|
||||||
contentDescription = "LUT",
|
contentDescription = "LUT",
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
)
|
)
|
||||||
@@ -999,7 +998,7 @@ class PhantomService(val context: Context) : LifecycleOwner, SavedStateRegistryO
|
|||||||
modifier = Modifier.size(48.dp)
|
modifier = Modifier.size(48.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Stop,
|
imageVector = AppIcons.Stop,
|
||||||
contentDescription = "Stop",
|
contentDescription = "Stop",
|
||||||
tint = Color.Red
|
tint = Color.Red
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import androidx.activity.ComponentActivity
|
|||||||
import androidx.activity.compose.BackHandler
|
import androidx.activity.compose.BackHandler
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.PictureInPictureAlt
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
@@ -55,6 +54,7 @@ import com.hinnka.mycamera.ui.theme.PhotonCameraTheme
|
|||||||
import com.hinnka.mycamera.utils.PLog
|
import com.hinnka.mycamera.utils.PLog
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
class ScreenCapturePipActivity : ComponentActivity() {
|
class ScreenCapturePipActivity : ComponentActivity() {
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ private fun ScreenCapturePipContent(
|
|||||||
.padding(top = 48.dp, end = 16.dp)
|
.padding(top = 48.dp, end = 16.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.PictureInPictureAlt,
|
imageVector = AppIcons.PictureInPictureAlt,
|
||||||
contentDescription = stringResource(R.string.screen_capture_return_to_pip)
|
contentDescription = stringResource(R.string.screen_capture_return_to_pip)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,16 +19,8 @@ import androidx.compose.foundation.shape.CircleShape
|
|||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.filled.Check
|
import androidx.compose.material.icons.filled.Check
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.outlined.Undo
|
|
||||||
import androidx.compose.material.icons.filled.CameraAlt
|
|
||||||
import androidx.compose.material.icons.filled.Cameraswitch
|
|
||||||
import androidx.compose.material.icons.filled.Bolt
|
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Layers
|
|
||||||
import androidx.compose.material.icons.filled.Pause
|
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material.icons.filled.Tune
|
|
||||||
import androidx.compose.material.icons.filled.Videocam
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -91,6 +83,7 @@ import kotlinx.coroutines.Job
|
|||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlin.math.*
|
import kotlin.math.*
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主相机界面
|
* 主相机界面
|
||||||
@@ -1578,7 +1571,7 @@ fun CameraScreen(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = stringResource(R.string.color_recipe),
|
contentDescription = stringResource(R.string.color_recipe),
|
||||||
tint = Color(0xFFFFD700), // Gold color to match VIP/Premium feel
|
tint = Color(0xFFFFD700), // Gold color to match VIP/Premium feel
|
||||||
modifier = Modifier.size(14.dp)
|
modifier = Modifier.size(14.dp)
|
||||||
@@ -1723,7 +1716,7 @@ fun MultipleExposureOverlay(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Layers,
|
imageVector = AppIcons.Layers,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color(0xFFE5A324),
|
tint = Color(0xFFE5A324),
|
||||||
modifier = Modifier.size(16.dp)
|
modifier = Modifier.size(16.dp)
|
||||||
@@ -1742,7 +1735,7 @@ fun MultipleExposureOverlay(
|
|||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.AutoMirrored.Outlined.Undo,
|
AppIcons.AutoMirroredOutlinedUndo,
|
||||||
contentDescription = stringResource(R.string.multiple_exposure_undo),
|
contentDescription = stringResource(R.string.multiple_exposure_undo),
|
||||||
modifier = Modifier.size(16.dp),
|
modifier = Modifier.size(16.dp),
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
@@ -1854,7 +1847,7 @@ fun Controls(
|
|||||||
.autoRotate()
|
.autoRotate()
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.CameraAlt,
|
imageVector = AppIcons.CameraAlt,
|
||||||
contentDescription = stringResource(R.string.take_photo),
|
contentDescription = stringResource(R.string.take_photo),
|
||||||
tint = Color.White,
|
tint = Color.White,
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
@@ -1876,7 +1869,7 @@ fun Controls(
|
|||||||
.autoRotate()
|
.autoRotate()
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = if (state.videoRecordingState.isPaused) Icons.Default.PlayArrow else Icons.Default.Pause,
|
imageVector = if (state.videoRecordingState.isPaused) Icons.Default.PlayArrow else AppIcons.Pause,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White,
|
tint = Color.White,
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
@@ -1892,7 +1885,7 @@ fun Controls(
|
|||||||
.autoRotate()
|
.autoRotate()
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Cameraswitch,
|
imageVector = AppIcons.Cameraswitch,
|
||||||
contentDescription = stringResource(R.string.switch_camera),
|
contentDescription = stringResource(R.string.switch_camera),
|
||||||
tint = Color.White,
|
tint = Color.White,
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
@@ -2106,7 +2099,7 @@ private fun CaptureModeSwitcher(
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
ModeSwitcherItem(
|
ModeSwitcherItem(
|
||||||
icon = Icons.Default.Bolt,
|
icon = AppIcons.Bolt,
|
||||||
selected = captureMode == CaptureMode.QUICK_SHOT,
|
selected = captureMode == CaptureMode.QUICK_SHOT,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
contentDescription = stringResource(R.string.capture_mode_quick_shot),
|
contentDescription = stringResource(R.string.capture_mode_quick_shot),
|
||||||
@@ -2114,7 +2107,7 @@ private fun CaptureModeSwitcher(
|
|||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
ModeSwitcherItem(
|
ModeSwitcherItem(
|
||||||
icon = Icons.Default.CameraAlt,
|
icon = AppIcons.CameraAlt,
|
||||||
selected = captureMode == CaptureMode.PHOTO,
|
selected = captureMode == CaptureMode.PHOTO,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
contentDescription = stringResource(R.string.capture_mode_photo),
|
contentDescription = stringResource(R.string.capture_mode_photo),
|
||||||
@@ -2122,7 +2115,7 @@ private fun CaptureModeSwitcher(
|
|||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
ModeSwitcherItem(
|
ModeSwitcherItem(
|
||||||
icon = Icons.Default.Videocam,
|
icon = AppIcons.Videocam,
|
||||||
selected = captureMode == CaptureMode.VIDEO,
|
selected = captureMode == CaptureMode.VIDEO,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
contentDescription = stringResource(R.string.capture_mode_video),
|
contentDescription = stringResource(R.string.capture_mode_video),
|
||||||
|
|||||||
@@ -8,14 +8,7 @@ import androidx.compose.foundation.layout.*
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.BarChart
|
|
||||||
import androidx.compose.material.icons.filled.FlashOff
|
|
||||||
import androidx.compose.material.icons.filled.FlashOn
|
|
||||||
import androidx.compose.material.icons.filled.FlashlightOff
|
|
||||||
import androidx.compose.material.icons.filled.FlashlightOn
|
|
||||||
import androidx.compose.material.icons.filled.Settings
|
import androidx.compose.material.icons.filled.Settings
|
||||||
import androidx.compose.material.icons.filled.Timer
|
|
||||||
import androidx.compose.material.icons.filled.Vibration
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -39,6 +32,7 @@ import com.hinnka.mycamera.video.VideoCapabilities
|
|||||||
import com.hinnka.mycamera.video.VideoConfig
|
import com.hinnka.mycamera.video.VideoConfig
|
||||||
import com.hinnka.mycamera.video.VideoLogProfile
|
import com.hinnka.mycamera.video.VideoLogProfile
|
||||||
import com.hinnka.mycamera.video.VideoResolutionPreset
|
import com.hinnka.mycamera.video.VideoResolutionPreset
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun CameraTopBar(
|
fun CameraTopBar(
|
||||||
@@ -108,10 +102,10 @@ fun CameraTopBar(
|
|||||||
IconButton(onClick = onFlashToggle) {
|
IconButton(onClick = onFlashToggle) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = when (flashMode) {
|
imageVector = when (flashMode) {
|
||||||
0 -> Icons.Default.FlashOff
|
0 -> AppIcons.FlashOff
|
||||||
1 -> Icons.Default.FlashOn
|
1 -> AppIcons.FlashOn
|
||||||
2 -> Icons.Default.FlashlightOn
|
2 -> AppIcons.FlashlightOn
|
||||||
else -> Icons.Default.FlashOff
|
else -> AppIcons.FlashOff
|
||||||
},
|
},
|
||||||
modifier = Modifier.size(20.dp).autoRotate(),
|
modifier = Modifier.size(20.dp).autoRotate(),
|
||||||
contentDescription = stringResource(R.string.flash),
|
contentDescription = stringResource(R.string.flash),
|
||||||
@@ -130,7 +124,7 @@ fun CameraTopBar(
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Timer,
|
imageVector = AppIcons.Timer,
|
||||||
contentDescription = stringResource(R.string.timer),
|
contentDescription = stringResource(R.string.timer),
|
||||||
modifier = Modifier.size(20.dp).autoRotate(),
|
modifier = Modifier.size(20.dp).autoRotate(),
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
@@ -149,7 +143,7 @@ fun CameraTopBar(
|
|||||||
|
|
||||||
IconButton(onClick = onHistogramToggle) {
|
IconButton(onClick = onHistogramToggle) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.BarChart,
|
imageVector = AppIcons.BarChart,
|
||||||
contentDescription = stringResource(R.string.histogram),
|
contentDescription = stringResource(R.string.histogram),
|
||||||
modifier = Modifier.size(20.dp).autoRotate(),
|
modifier = Modifier.size(20.dp).autoRotate(),
|
||||||
tint = if (showHistogram) Color.Yellow else Color.White
|
tint = if (showHistogram) Color.Yellow else Color.White
|
||||||
@@ -191,10 +185,10 @@ private fun QuickShotTopBar(
|
|||||||
IconButton(onClick = onFlashToggle) {
|
IconButton(onClick = onFlashToggle) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = when (flashMode) {
|
imageVector = when (flashMode) {
|
||||||
0 -> Icons.Default.FlashOff
|
0 -> AppIcons.FlashOff
|
||||||
1 -> Icons.Default.FlashOn
|
1 -> AppIcons.FlashOn
|
||||||
2 -> Icons.Default.FlashlightOn
|
2 -> AppIcons.FlashlightOn
|
||||||
else -> Icons.Default.FlashOff
|
else -> AppIcons.FlashOff
|
||||||
},
|
},
|
||||||
modifier = Modifier.size(20.dp).autoRotate(),
|
modifier = Modifier.size(20.dp).autoRotate(),
|
||||||
contentDescription = stringResource(R.string.flash),
|
contentDescription = stringResource(R.string.flash),
|
||||||
@@ -219,7 +213,7 @@ private fun QuickShotTopBar(
|
|||||||
|
|
||||||
IconButton(onClick = onHistogramToggle) {
|
IconButton(onClick = onHistogramToggle) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.BarChart,
|
imageVector = AppIcons.BarChart,
|
||||||
contentDescription = stringResource(R.string.histogram),
|
contentDescription = stringResource(R.string.histogram),
|
||||||
modifier = Modifier.size(20.dp).autoRotate(),
|
modifier = Modifier.size(20.dp).autoRotate(),
|
||||||
tint = if (showHistogram) Color.Yellow else Color.White
|
tint = if (showHistogram) Color.Yellow else Color.White
|
||||||
@@ -281,7 +275,7 @@ private fun VideoTopBar(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
VideoActionIcon(
|
VideoActionIcon(
|
||||||
icon = if (videoConfig.torchEnabled) Icons.Default.FlashlightOn else Icons.Default.FlashlightOff,
|
icon = if (videoConfig.torchEnabled) AppIcons.FlashlightOn else AppIcons.FlashlightOff,
|
||||||
active = videoConfig.torchEnabled,
|
active = videoConfig.torchEnabled,
|
||||||
enabled = videoCapabilities.supportsTorch,
|
enabled = videoCapabilities.supportsTorch,
|
||||||
onClick = onVideoTorchToggle,
|
onClick = onVideoTorchToggle,
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import com.hinnka.mycamera.ui.components.RawEditPanelContentMode
|
|||||||
import com.hinnka.mycamera.ui.components.RawDcpLensOption
|
import com.hinnka.mycamera.ui.components.RawDcpLensOption
|
||||||
import com.hinnka.mycamera.video.*
|
import com.hinnka.mycamera.video.*
|
||||||
import com.hinnka.mycamera.video.VideoCodec
|
import com.hinnka.mycamera.video.VideoCodec
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
private enum class VideoSettingPanel {
|
private enum class VideoSettingPanel {
|
||||||
ASPECT_RATIO,
|
ASPECT_RATIO,
|
||||||
@@ -293,14 +294,14 @@ fun CameraTopSheet(
|
|||||||
|
|
||||||
QuickSettingButton(
|
QuickSettingButton(
|
||||||
title = stringResource(R.string.settings_filter_management),
|
title = stringResource(R.string.settings_filter_management),
|
||||||
icon = Icons.Default.AutoAwesome,
|
icon = AppIcons.AutoAwesome,
|
||||||
onClick = onFilterManageClick,
|
onClick = onFilterManageClick,
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
|
|
||||||
QuickSettingButton(
|
QuickSettingButton(
|
||||||
title = stringResource(R.string.settings_frame_management),
|
title = stringResource(R.string.settings_frame_management),
|
||||||
icon = Icons.Default.BorderBottom,
|
icon = AppIcons.BorderBottom,
|
||||||
onClick = onFrameManageClick,
|
onClick = onFrameManageClick,
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
@@ -531,14 +532,14 @@ fun CameraTopSheet(
|
|||||||
) {
|
) {
|
||||||
QuickSettingButton(
|
QuickSettingButton(
|
||||||
title = stringResource(R.string.settings_filter_management),
|
title = stringResource(R.string.settings_filter_management),
|
||||||
icon = Icons.Default.AutoAwesome,
|
icon = AppIcons.AutoAwesome,
|
||||||
onClick = onFilterManageClick,
|
onClick = onFilterManageClick,
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
|
|
||||||
QuickSettingButton(
|
QuickSettingButton(
|
||||||
title = stringResource(R.string.settings_frame_management),
|
title = stringResource(R.string.settings_frame_management),
|
||||||
icon = Icons.Default.BorderBottom,
|
icon = AppIcons.BorderBottom,
|
||||||
onClick = onFrameManageClick,
|
onClick = onFrameManageClick,
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
@@ -583,7 +584,7 @@ fun CameraTopSheet(
|
|||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.3f),
|
tint = Color.White.copy(alpha = 0.3f),
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
@@ -738,7 +739,7 @@ private fun RowScope.VideoSettingTile(
|
|||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = if (expanded) Icons.Default.ExpandLess else Icons.Default.OpenInFull,
|
imageVector = if (expanded) AppIcons.ExpandLess else AppIcons.OpenInFull,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (expanded) Color.Black else Color.White.copy(alpha = 0.8f),
|
tint = if (expanded) Color.Black else Color.White.copy(alpha = 0.8f),
|
||||||
modifier = Modifier.size(12.dp)
|
modifier = Modifier.size(12.dp)
|
||||||
@@ -912,7 +913,7 @@ private fun ToolboxQuickSetting(
|
|||||||
) {
|
) {
|
||||||
QuickSettingButton(
|
QuickSettingButton(
|
||||||
title = stringResource(R.string.toolbox_title),
|
title = stringResource(R.string.toolbox_title),
|
||||||
icon = Icons.Default.Palette,
|
icon = AppIcons.Palette,
|
||||||
onClick = onToolboxClick,
|
onClick = onToolboxClick,
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
)
|
)
|
||||||
@@ -1024,7 +1025,7 @@ fun QuickSettingButton2(
|
|||||||
fontWeight = if (checked) FontWeight.Bold else FontWeight.Normal,
|
fontWeight = if (checked) FontWeight.Bold else FontWeight.Normal,
|
||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (checked) Color(0xFFFF6B35) else Color.White.copy(alpha = 0.9f),
|
tint = if (checked) Color(0xFFFF6B35) else Color.White.copy(alpha = 0.9f),
|
||||||
modifier = Modifier.size(18.dp)
|
modifier = Modifier.size(18.dp)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Check
|
import androidx.compose.material.icons.filled.Check
|
||||||
import androidx.compose.material.icons.filled.Shuffle
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -38,6 +37,7 @@ import kotlin.math.*
|
|||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -171,7 +171,7 @@ fun ColorWalkScreen(
|
|||||||
},
|
},
|
||||||
colors = ButtonDefaults.textButtonColors(contentColor = MaterialTheme.colorScheme.primary)
|
colors = ButtonDefaults.textButtonColors(contentColor = MaterialTheme.colorScheme.primary)
|
||||||
) {
|
) {
|
||||||
Icon(Icons.Default.Shuffle, contentDescription = null, modifier = Modifier.size(16.dp))
|
Icon(AppIcons.Shuffle, contentDescription = null, modifier = Modifier.size(16.dp))
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
Text(stringResource(R.string.color_walk_random), fontSize = 14.sp)
|
Text(stringResource(R.string.color_walk_random), fontSize = 14.sp)
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,7 @@ fun ColorWalkScreen(
|
|||||||
) {
|
) {
|
||||||
Box(contentAlignment = Alignment.Center) {
|
Box(contentAlignment = Alignment.Center) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.Shuffle,
|
AppIcons.Shuffle,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (selectedColor.isDark()) Color.White.copy(alpha = 0.3f) else Color.Black.copy(alpha = 0.3f),
|
tint = if (selectedColor.isDark()) Color.White.copy(alpha = 0.3f) else Color.Black.copy(alpha = 0.3f),
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
|
|||||||
@@ -8,16 +8,7 @@ import androidx.compose.foundation.lazy.items
|
|||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Business
|
|
||||||
import androidx.compose.material.icons.filled.Contrast
|
|
||||||
import androidx.compose.material.icons.filled.Flag
|
|
||||||
import androidx.compose.material.icons.filled.Grain
|
|
||||||
import androidx.compose.material.icons.filled.Image
|
|
||||||
import androidx.compose.material.icons.filled.Iso
|
|
||||||
import androidx.compose.material.icons.filled.Layers
|
|
||||||
import androidx.compose.material.icons.filled.LocationOn
|
import androidx.compose.material.icons.filled.LocationOn
|
||||||
import androidx.compose.material.icons.filled.Photo
|
|
||||||
import androidx.compose.material.icons.filled.Public
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
@@ -38,8 +29,8 @@ import com.hinnka.mycamera.R
|
|||||||
import com.hinnka.mycamera.model.Film
|
import com.hinnka.mycamera.model.Film
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.compose.material.icons.filled.Bookmark
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -116,16 +107,16 @@ fun FilmDetailScreen(
|
|||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.SpaceEvenly
|
horizontalArrangement = Arrangement.SpaceEvenly
|
||||||
) {
|
) {
|
||||||
InfoItem(Icons.Default.Layers, film.type ?: stringResource(R.string.unknown))
|
InfoItem(AppIcons.Layers, film.type ?: stringResource(R.string.unknown))
|
||||||
InfoItem(Icons.Default.Business, film.manufacturer ?: "N/A")
|
InfoItem(AppIcons.Business, film.manufacturer ?: "N/A")
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
Spacer(modifier = Modifier.height(12.dp))
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.SpaceEvenly
|
horizontalArrangement = Arrangement.SpaceEvenly
|
||||||
) {
|
) {
|
||||||
InfoItem(Icons.Default.Photo, film.formats?.joinToString(", ") ?: "N/A")
|
InfoItem(AppIcons.Photo, film.formats?.joinToString(", ") ?: "N/A")
|
||||||
InfoItem(Icons.Default.Public, film.origin ?: "N/A")
|
InfoItem(AppIcons.Public, film.origin ?: "N/A")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,10 +138,10 @@ fun FilmDetailScreen(
|
|||||||
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.padding(16.dp)) {
|
Column(modifier = Modifier.padding(16.dp)) {
|
||||||
SpecRow(Icons.Default.Layers, film.type ?: stringResource(R.string.unknown))
|
SpecRow(AppIcons.Layers, film.type ?: stringResource(R.string.unknown))
|
||||||
SpecRow(Icons.Default.Iso, film.iso ?: stringResource(R.string.unknown))
|
SpecRow(AppIcons.Iso, film.iso ?: stringResource(R.string.unknown))
|
||||||
SpecRow(Icons.Default.Grain, film.grain ?: "N/A")
|
SpecRow(AppIcons.Grain, film.grain ?: "N/A")
|
||||||
SpecRow(Icons.Default.Contrast, film.contrast ?: "N/A")
|
SpecRow(AppIcons.Contrast, film.contrast ?: "N/A")
|
||||||
|
|
||||||
if (!film.bestFor.isNullOrEmpty()) {
|
if (!film.bestFor.isNullOrEmpty()) {
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
Spacer(modifier = Modifier.height(12.dp))
|
||||||
@@ -282,7 +273,7 @@ private fun ExamplePhotoCard(example: String) {
|
|||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Bookmark,
|
imageVector = AppIcons.Bookmark,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.size(16.dp),
|
modifier = Modifier.size(16.dp),
|
||||||
tint = Color(0xFFFFD700)
|
tint = Color(0xFFFFD700)
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowLeft
|
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowRight
|
|
||||||
import androidx.compose.material.icons.filled.*
|
import androidx.compose.material.icons.filled.*
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
@@ -61,6 +59,7 @@ import java.io.File
|
|||||||
import java.io.FileOutputStream
|
import java.io.FileOutputStream
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼图卡片布局结果数据类
|
* 拼图卡片布局结果数据类
|
||||||
@@ -521,7 +520,7 @@ fun PuzzleScreen(
|
|||||||
) {
|
) {
|
||||||
// 左移按钮
|
// 左移按钮
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.AutoMirrored.Filled.ArrowLeft,
|
imageVector = AppIcons.AutoMirroredArrowLeft,
|
||||||
contentDescription = "Move Left",
|
contentDescription = "Move Left",
|
||||||
tint = if (index > 0) Color.White else Color.White.copy(alpha = 0.2f),
|
tint = if (index > 0) Color.White else Color.White.copy(alpha = 0.2f),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -540,7 +539,7 @@ fun PuzzleScreen(
|
|||||||
)
|
)
|
||||||
// 右移按钮
|
// 右移按钮
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.AutoMirrored.Filled.ArrowRight,
|
imageVector = AppIcons.AutoMirroredArrowRight,
|
||||||
contentDescription = "Move Right",
|
contentDescription = "Move Right",
|
||||||
tint = if (index < selectedPhotoUris.size - 1) Color.White else Color.White.copy(alpha = 0.2f),
|
tint = if (index < selectedPhotoUris.size - 1) Color.White else Color.White.copy(alpha = 0.2f),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ import androidx.compose.foundation.lazy.grid.items
|
|||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.AddPhotoAlternate
|
|
||||||
import androidx.compose.material.icons.filled.DirectionsWalk
|
|
||||||
import androidx.compose.material.icons.filled.FilterFrames
|
|
||||||
import androidx.compose.material.icons.filled.Layers
|
|
||||||
import androidx.compose.material.icons.filled.Palette
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -27,6 +22,7 @@ import androidx.compose.ui.text.style.TextAlign
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.hinnka.mycamera.R
|
import com.hinnka.mycamera.R
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
data class ToolboxItem(
|
data class ToolboxItem(
|
||||||
val titleRes: Int,
|
val titleRes: Int,
|
||||||
@@ -50,31 +46,31 @@ fun ToolboxScreen(
|
|||||||
ToolboxItem(
|
ToolboxItem(
|
||||||
titleRes = R.string.lut_creator_title,
|
titleRes = R.string.lut_creator_title,
|
||||||
descriptionRes = R.string.lut_creator_desc,
|
descriptionRes = R.string.lut_creator_desc,
|
||||||
icon = Icons.Default.Palette,
|
icon = AppIcons.Palette,
|
||||||
onClick = onLutCreatorClick
|
onClick = onLutCreatorClick
|
||||||
),
|
),
|
||||||
ToolboxItem(
|
ToolboxItem(
|
||||||
titleRes = R.string.lut_synthesis_title,
|
titleRes = R.string.lut_synthesis_title,
|
||||||
descriptionRes = R.string.lut_synthesis_desc,
|
descriptionRes = R.string.lut_synthesis_desc,
|
||||||
icon = Icons.Default.Layers,
|
icon = AppIcons.Layers,
|
||||||
onClick = onLutSynthesisClick
|
onClick = onLutSynthesisClick
|
||||||
),
|
),
|
||||||
ToolboxItem(
|
ToolboxItem(
|
||||||
titleRes = R.string.toolbox_puzzle_title,
|
titleRes = R.string.toolbox_puzzle_title,
|
||||||
descriptionRes = R.string.toolbox_puzzle_desc,
|
descriptionRes = R.string.toolbox_puzzle_desc,
|
||||||
icon = Icons.Default.AddPhotoAlternate,
|
icon = AppIcons.AddPhotoAlternate,
|
||||||
onClick = onPuzzleClick
|
onClick = onPuzzleClick
|
||||||
),
|
),
|
||||||
ToolboxItem(
|
ToolboxItem(
|
||||||
titleRes = R.string.color_walk_title,
|
titleRes = R.string.color_walk_title,
|
||||||
descriptionRes = R.string.color_walk_short_desc,
|
descriptionRes = R.string.color_walk_short_desc,
|
||||||
icon = Icons.Default.DirectionsWalk,
|
icon = AppIcons.DirectionsWalk,
|
||||||
onClick = onColorWalkClick
|
onClick = onColorWalkClick
|
||||||
),
|
),
|
||||||
ToolboxItem(
|
ToolboxItem(
|
||||||
titleRes = R.string.film_library_title,
|
titleRes = R.string.film_library_title,
|
||||||
descriptionRes = R.string.film_library_desc,
|
descriptionRes = R.string.film_library_desc,
|
||||||
icon = Icons.Default.FilterFrames,
|
icon = AppIcons.FilterFrames,
|
||||||
onClick = onFilmLibraryClick
|
onClick = onFilmLibraryClick
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import androidx.compose.foundation.layout.*
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.AutoAwesome
|
|
||||||
import androidx.compose.material.icons.filled.FilterVintage
|
|
||||||
import androidx.compose.material.icons.filled.Palette
|
|
||||||
import androidx.compose.material.icons.filled.SwapHoriz
|
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
@@ -45,6 +41,7 @@ import kotlin.math.abs
|
|||||||
import kotlin.math.exp
|
import kotlin.math.exp
|
||||||
import kotlin.math.ln
|
import kotlin.math.ln
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示模式:变焦倍率 or 35mm等效焦距
|
* 显示模式:变焦倍率 or 35mm等效焦距
|
||||||
@@ -246,7 +243,7 @@ fun ZoomControlBar(
|
|||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.SwapHoriz,
|
imageVector = AppIcons.SwapHoriz,
|
||||||
contentDescription = stringResource(R.string.toggle_display_mode),
|
contentDescription = stringResource(R.string.toggle_display_mode),
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
||||||
@@ -268,7 +265,7 @@ fun ZoomControlBar(
|
|||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.AutoAwesome,
|
imageVector = AppIcons.AutoAwesome,
|
||||||
contentDescription = stringResource(R.string.filters_panel),
|
contentDescription = stringResource(R.string.filters_panel),
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
||||||
@@ -425,7 +422,7 @@ fun ZoomRuler(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.FilterVintage,
|
imageVector = AppIcons.FilterVintage,
|
||||||
contentDescription = "Macro",
|
contentDescription = "Macro",
|
||||||
tint = if (isSelected) activeColor else inactiveColor,
|
tint = if (isSelected) activeColor else inactiveColor,
|
||||||
modifier = Modifier.size(if (isSelected) 16.dp else 14.dp)
|
modifier = Modifier.size(if (isSelected) 16.dp else 14.dp)
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ import androidx.compose.foundation.layout.*
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.AutoAwesome
|
|
||||||
import androidx.compose.material.icons.filled.FilterVintage
|
|
||||||
import androidx.compose.material.icons.filled.SwapHoriz
|
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
@@ -42,6 +39,7 @@ import kotlin.math.abs
|
|||||||
import kotlin.math.exp
|
import kotlin.math.exp
|
||||||
import kotlin.math.ln
|
import kotlin.math.ln
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -224,7 +222,7 @@ fun ZoomControlBarVerticel(
|
|||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.SwapHoriz,
|
imageVector = AppIcons.SwapHoriz,
|
||||||
contentDescription = stringResource(R.string.toggle_display_mode),
|
contentDescription = stringResource(R.string.toggle_display_mode),
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
||||||
@@ -246,7 +244,7 @@ fun ZoomControlBarVerticel(
|
|||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.AutoAwesome,
|
imageVector = AppIcons.AutoAwesome,
|
||||||
contentDescription = stringResource(R.string.filters_panel),
|
contentDescription = stringResource(R.string.filters_panel),
|
||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
.background(Color.Black.copy(alpha = 0.3f), CircleShape)
|
||||||
@@ -402,7 +400,7 @@ fun ZoomRulerVertical(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.FilterVintage,
|
imageVector = AppIcons.FilterVintage,
|
||||||
contentDescription = "Macro",
|
contentDescription = "Macro",
|
||||||
tint = if (isSelected) activeColor else inactiveColor,
|
tint = if (isSelected) activeColor else inactiveColor,
|
||||||
modifier = Modifier.size(if (isSelected) 16.dp else 14.dp)
|
modifier = Modifier.size(if (isSelected) 16.dp else 14.dp)
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import androidx.compose.foundation.verticalScroll
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Layers
|
|
||||||
import androidx.compose.material3.BottomSheetDefaults
|
import androidx.compose.material3.BottomSheetDefaults
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
@@ -29,6 +28,7 @@ import androidx.compose.ui.unit.sp
|
|||||||
import com.hinnka.mycamera.model.EffectParams
|
import com.hinnka.mycamera.model.EffectParams
|
||||||
import com.hinnka.mycamera.model.RecipeParam
|
import com.hinnka.mycamera.model.RecipeParam
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
enum class EffectType(
|
enum class EffectType(
|
||||||
val recipeParam: RecipeParam,
|
val recipeParam: RecipeParam,
|
||||||
@@ -91,7 +91,7 @@ fun EffectsActionChip(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Layers,
|
imageVector = AppIcons.Layers,
|
||||||
contentDescription = stringResource(com.hinnka.mycamera.R.string.effects_title),
|
contentDescription = stringResource(com.hinnka.mycamera.R.string.effects_title),
|
||||||
tint = Color(0xFF00FFCC),
|
tint = Color(0xFF00FFCC),
|
||||||
modifier = Modifier.size(14.dp)
|
modifier = Modifier.size(14.dp)
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import androidx.compose.foundation.layout.*
|
|||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Crop169
|
|
||||||
import androidx.compose.material.icons.filled.Image
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -24,6 +22,7 @@ import androidx.compose.ui.unit.sp
|
|||||||
import com.hinnka.mycamera.R
|
import com.hinnka.mycamera.R
|
||||||
import com.hinnka.mycamera.frame.FrameInfo
|
import com.hinnka.mycamera.frame.FrameInfo
|
||||||
import com.hinnka.mycamera.ui.theme.AccentOrange
|
import com.hinnka.mycamera.ui.theme.AccentOrange
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 边框选择器组件
|
* 边框选择器组件
|
||||||
@@ -95,7 +94,7 @@ private fun FrameItem(
|
|||||||
) {
|
) {
|
||||||
if (isNone) {
|
if (isNone) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Image,
|
imageVector = AppIcons.Image,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.6f),
|
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.6f),
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
@@ -103,7 +102,7 @@ private fun FrameItem(
|
|||||||
} else {
|
} else {
|
||||||
// 显示边框预览图标
|
// 显示边框预览图标
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Crop169,
|
imageVector = AppIcons.Crop169,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.6f),
|
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.6f),
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.PhotoLibrary
|
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -24,6 +23,7 @@ import coil.compose.AsyncImage
|
|||||||
import coil.request.ImageRequest
|
import coil.request.ImageRequest
|
||||||
import com.hinnka.mycamera.gallery.MediaData
|
import com.hinnka.mycamera.gallery.MediaData
|
||||||
import com.hinnka.mycamera.viewmodel.GalleryViewModel
|
import com.hinnka.mycamera.viewmodel.GalleryViewModel
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 相册入口缩略图组件
|
* 相册入口缩略图组件
|
||||||
@@ -80,7 +80,7 @@ fun GalleryThumbnail(
|
|||||||
} else {
|
} else {
|
||||||
// 没有照片时显示图标
|
// 没有照片时显示图标
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.PhotoLibrary,
|
imageVector = AppIcons.PhotoLibrary,
|
||||||
contentDescription = "Gallery",
|
contentDescription = "Gallery",
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Clear
|
import androidx.compose.material.icons.filled.Clear
|
||||||
import androidx.compose.material.icons.filled.ContentCopy
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -25,6 +24,7 @@ import androidx.compose.ui.unit.sp
|
|||||||
import androidx.compose.ui.window.Dialog
|
import androidx.compose.ui.window.Dialog
|
||||||
import androidx.compose.ui.window.DialogProperties
|
import androidx.compose.ui.window.DialogProperties
|
||||||
import com.hinnka.mycamera.utils.PLog
|
import com.hinnka.mycamera.utils.PLog
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志查看器弹窗
|
* 日志查看器弹窗
|
||||||
@@ -132,7 +132,7 @@ private fun LogViewerHeader(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ContentCopy,
|
imageVector = AppIcons.ContentCopy,
|
||||||
contentDescription = "复制全部",
|
contentDescription = "复制全部",
|
||||||
tint = Color(0xFF4CAF50)
|
tint = Color(0xFF4CAF50)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.FilterNone
|
|
||||||
import androidx.compose.material.icons.filled.Settings
|
import androidx.compose.material.icons.filled.Settings
|
||||||
import androidx.compose.material.icons.filled.Tune
|
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
@@ -43,6 +41,7 @@ import com.hinnka.mycamera.ui.camera.LutEditBottomSheet
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun LutSelectorWithRecipeAction(
|
fun LutSelectorWithRecipeAction(
|
||||||
@@ -102,7 +101,7 @@ fun LutSelectorWithRecipeAction(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (recipeIsCustomized) Color(0xFFFF9800) else Color(0xFFFFD700),
|
tint = if (recipeIsCustomized) Color(0xFFFF9800) else Color(0xFFFFD700),
|
||||||
modifier = Modifier.size(14.dp)
|
modifier = Modifier.size(14.dp)
|
||||||
@@ -586,7 +585,7 @@ private fun LutItem(
|
|||||||
}
|
}
|
||||||
if (isNone) {
|
if (isNone) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.FilterNone,
|
imageVector = AppIcons.FilterNone,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
@@ -608,7 +607,7 @@ private fun LutItem(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = stringResource(R.string.edit),
|
contentDescription = stringResource(R.string.edit),
|
||||||
tint = Color.White,
|
tint = Color.White,
|
||||||
modifier = Modifier.size(14.dp)
|
modifier = Modifier.size(14.dp)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.*
|
|||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Check
|
import androidx.compose.material.icons.filled.Check
|
||||||
import androidx.compose.material.icons.filled.ChevronRight
|
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Delete
|
import androidx.compose.material.icons.filled.Delete
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
@@ -39,6 +38,7 @@ import com.hinnka.mycamera.raw.SpectralFilmSelection
|
|||||||
import com.hinnka.mycamera.raw.SpectralFilmUiInfo
|
import com.hinnka.mycamera.raw.SpectralFilmUiInfo
|
||||||
import com.hinnka.mycamera.raw.SpectralFilmTuning
|
import com.hinnka.mycamera.raw.SpectralFilmTuning
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
enum class RawEditPanelContentMode {
|
enum class RawEditPanelContentMode {
|
||||||
FULL,
|
FULL,
|
||||||
@@ -638,7 +638,7 @@ private fun RawSpectralFilmTuningHeader(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.75f),
|
tint = Color.White.copy(alpha = 0.75f),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -794,7 +794,7 @@ private fun RawRenderingEngineSelector(
|
|||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
@@ -986,7 +986,7 @@ fun RawDcpSelector(
|
|||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
@@ -1213,7 +1213,7 @@ private fun DcpTargetItem(
|
|||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
Spacer(modifier = Modifier.width(12.dp))
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.45f),
|
tint = Color.White.copy(alpha = 0.45f),
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
@@ -1328,7 +1328,7 @@ fun RawBaselineColorCorrectionSelector(
|
|||||||
|
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f),
|
tint = Color.White.copy(alpha = 0.6f),
|
||||||
modifier = Modifier.clickable { openSheet() }
|
modifier = Modifier.clickable { openSheet() }
|
||||||
@@ -1477,7 +1477,7 @@ fun RawSpectralFilmSelector(
|
|||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
@@ -1587,7 +1587,7 @@ fun RawSpectralPrintSelector(
|
|||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import kotlinx.coroutines.suspendCancellableCoroutine
|
|||||||
import kotlin.coroutines.resume
|
import kotlin.coroutines.resume
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -192,7 +193,7 @@ fun BurstDetailScreen(
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = if (isMainPhoto) Icons.Default.Star else Icons.Default.StarBorder,
|
imageVector = if (isMainPhoto) Icons.Default.Star else AppIcons.StarBorder,
|
||||||
contentDescription = "设为主图",
|
contentDescription = "设为主图",
|
||||||
tint = if (isMainPhoto) AccentOrange else Color.White
|
tint = if (isMainPhoto) AccentOrange else Color.White
|
||||||
)
|
)
|
||||||
@@ -207,7 +208,7 @@ fun BurstDetailScreen(
|
|||||||
.background(Color.White.copy(alpha = 0.1f), CircleShape)
|
.background(Color.White.copy(alpha = 0.1f), CircleShape)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Output,
|
imageVector = AppIcons.Output,
|
||||||
contentDescription = stringResource(R.string.export),
|
contentDescription = stringResource(R.string.export),
|
||||||
tint = AccentOrange
|
tint = AccentOrange
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -34,11 +34,10 @@ import com.hinnka.mycamera.ui.theme.AccentOrange
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Article
|
|
||||||
import androidx.compose.material.icons.filled.FilterNone
|
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 裁剪比例选项
|
* 裁剪比例选项
|
||||||
@@ -210,7 +209,7 @@ private fun CropAspectOptionItem(
|
|||||||
when (option) {
|
when (option) {
|
||||||
is CropAspectOption.Free -> {
|
is CropAspectOption.Free -> {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.FilterNone,
|
imageVector = AppIcons.FilterNone,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.5f),
|
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.5f),
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
@@ -218,7 +217,7 @@ private fun CropAspectOptionItem(
|
|||||||
}
|
}
|
||||||
is CropAspectOption.Original -> {
|
is CropAspectOption.Original -> {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Article,
|
imageVector = AppIcons.Article,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.5f),
|
tint = if (isSelected) AccentOrange else Color.White.copy(alpha = 0.5f),
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ import me.saket.telephoto.zoomable.DoubleClickToZoomListener
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 照片详情界面
|
* 照片详情界面
|
||||||
@@ -280,7 +281,7 @@ fun GalleryDetailScreen(
|
|||||||
modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp)
|
modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.GridView,
|
imageVector = AppIcons.GridView,
|
||||||
contentDescription = "Gallery",
|
contentDescription = "Gallery",
|
||||||
modifier = Modifier.size(18.dp)
|
modifier = Modifier.size(18.dp)
|
||||||
)
|
)
|
||||||
@@ -369,7 +370,7 @@ fun GalleryDetailScreen(
|
|||||||
if (currentPhoto != null && currentPhoto.isImage && currentPhoto.isBurstPhoto) {
|
if (currentPhoto != null && currentPhoto.isImage && currentPhoto.isBurstPhoto) {
|
||||||
IconButton(onClick = { onViewBurst?.invoke(currentPhoto.id) }, modifier = Modifier.autoRotate()) {
|
IconButton(onClick = { onViewBurst?.invoke(currentPhoto.id) }, modifier = Modifier.autoRotate()) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.BurstMode,
|
imageVector = AppIcons.BurstMode,
|
||||||
contentDescription = "查看连拍照片", // 连拍照片
|
contentDescription = "查看连拍照片", // 连拍照片
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
)
|
)
|
||||||
@@ -422,7 +423,7 @@ fun GalleryDetailScreen(
|
|||||||
// AI 评分
|
// AI 评分
|
||||||
if (currentPhoto?.isImage == true) {
|
if (currentPhoto?.isImage == true) {
|
||||||
GalleryActionItem(
|
GalleryActionItem(
|
||||||
icon = Icons.Default.AutoAwesome,
|
icon = AppIcons.AutoAwesome,
|
||||||
text = stringResource(R.string.gallery_ai_analysis),
|
text = stringResource(R.string.gallery_ai_analysis),
|
||||||
contentColor = AccentOrange,
|
contentColor = AccentOrange,
|
||||||
containerColor = AccentOrange.copy(alpha = 0.15f),
|
containerColor = AccentOrange.copy(alpha = 0.15f),
|
||||||
@@ -454,7 +455,7 @@ fun GalleryDetailScreen(
|
|||||||
|
|
||||||
// 更多
|
// 更多
|
||||||
GalleryActionItem(
|
GalleryActionItem(
|
||||||
icon = Icons.Default.MoreHoriz,
|
icon = AppIcons.MoreHoriz,
|
||||||
text = stringResource(R.string.more_options),
|
text = stringResource(R.string.more_options),
|
||||||
onClick = { showMoreSheet = true },
|
onClick = { showMoreSheet = true },
|
||||||
)
|
)
|
||||||
@@ -875,7 +876,7 @@ fun GalleryDetailScreen(
|
|||||||
// 导出
|
// 导出
|
||||||
if (currentPhoto.isImage && (viewModel.selectedTab == GalleryTab.PHOTON || currentPhoto.relatedPhoto != null)) {
|
if (currentPhoto.isImage && (viewModel.selectedTab == GalleryTab.PHOTON || currentPhoto.relatedPhoto != null)) {
|
||||||
GalleryActionItem(
|
GalleryActionItem(
|
||||||
icon = Icons.Default.Output,
|
icon = AppIcons.Output,
|
||||||
text = stringResource(R.string.export),
|
text = stringResource(R.string.export),
|
||||||
isLoading = isSaving,
|
isLoading = isSaving,
|
||||||
onClick = {
|
onClick = {
|
||||||
@@ -887,7 +888,7 @@ fun GalleryDetailScreen(
|
|||||||
// 视频导出按钮(仅视频)
|
// 视频导出按钮(仅视频)
|
||||||
if (currentPhoto.isVideo) {
|
if (currentPhoto.isVideo) {
|
||||||
GalleryActionItem(
|
GalleryActionItem(
|
||||||
icon = Icons.Default.Output,
|
icon = AppIcons.Output,
|
||||||
text = if (isVideoExporting && videoExportProgress > 0) "$videoExportProgress%" else stringResource(R.string.export),
|
text = if (isVideoExporting && videoExportProgress > 0) "$videoExportProgress%" else stringResource(R.string.export),
|
||||||
isLoading = isVideoExporting,
|
isLoading = isVideoExporting,
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import androidx.compose.foundation.gestures.detectDragGestures
|
|||||||
import androidx.compose.ui.unit.IntOffset
|
import androidx.compose.ui.unit.IntOffset
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.PushPin
|
|
||||||
import androidx.compose.ui.zIndex
|
import androidx.compose.ui.zIndex
|
||||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
@@ -31,7 +30,6 @@ import androidx.compose.material.icons.Icons
|
|||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Check
|
import androidx.compose.material.icons.filled.Check
|
||||||
import androidx.compose.material.icons.filled.Refresh
|
import androidx.compose.material.icons.filled.Refresh
|
||||||
import androidx.compose.material.icons.filled.Tune
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@@ -92,6 +90,7 @@ import com.hinnka.mycamera.lut.LutConfig
|
|||||||
import com.hinnka.mycamera.ui.camera.autoRotate
|
import com.hinnka.mycamera.ui.camera.autoRotate
|
||||||
import com.hinnka.mycamera.ui.components.RawEditPanelContentMode
|
import com.hinnka.mycamera.ui.components.RawEditPanelContentMode
|
||||||
import me.saket.telephoto.zoomable.DoubleClickToZoomListener
|
import me.saket.telephoto.zoomable.DoubleClickToZoomListener
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
private data class PreviewRenderSignature(
|
private data class PreviewRenderSignature(
|
||||||
val photoId: String,
|
val photoId: String,
|
||||||
@@ -479,7 +478,7 @@ fun GalleryEditScreen(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.PushPin,
|
imageVector = AppIcons.PushPin,
|
||||||
contentDescription = "Show Reference",
|
contentDescription = "Show Reference",
|
||||||
tint = Color(0xFFFFD700),
|
tint = Color(0xFFFFD700),
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
@@ -525,7 +524,7 @@ fun GalleryEditScreen(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.PushPin,
|
imageVector = AppIcons.PushPin,
|
||||||
contentDescription = "Minimize",
|
contentDescription = "Minimize",
|
||||||
tint = Color.White,
|
tint = Color.White,
|
||||||
modifier = Modifier.size(12.dp)
|
modifier = Modifier.size(12.dp)
|
||||||
@@ -936,7 +935,7 @@ fun GalleryEditScreen(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color(0xFFFFD700),
|
tint = Color(0xFFFFD700),
|
||||||
modifier = Modifier.size(14.dp)
|
modifier = Modifier.size(14.dp)
|
||||||
@@ -1439,7 +1438,7 @@ private fun FrameOption(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = stringResource(R.string.edit),
|
contentDescription = stringResource(R.string.edit),
|
||||||
tint = Color.White,
|
tint = Color.White,
|
||||||
modifier = Modifier.size(14.dp)
|
modifier = Modifier.size(14.dp)
|
||||||
|
|||||||
@@ -36,10 +36,7 @@ import androidx.compose.material.icons.Icons
|
|||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Delete
|
import androidx.compose.material.icons.filled.Delete
|
||||||
import androidx.compose.material.icons.filled.SelectAll
|
|
||||||
import androidx.compose.material.icons.filled.Share
|
import androidx.compose.material.icons.filled.Share
|
||||||
import androidx.compose.material.icons.filled.AddPhotoAlternate
|
|
||||||
import androidx.compose.material.icons.filled.Output
|
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.material3.TabRowDefaults.tabIndicatorOffset
|
import androidx.compose.material3.TabRowDefaults.tabIndicatorOffset
|
||||||
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||||
@@ -82,6 +79,7 @@ import android.os.Parcelable
|
|||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
private const val GALLERY_SCREEN_TAG = "GalleryScreen"
|
private const val GALLERY_SCREEN_TAG = "GalleryScreen"
|
||||||
|
|
||||||
@@ -319,7 +317,7 @@ fun GalleryScreen(
|
|||||||
if (isSelectionMode) {
|
if (isSelectionMode) {
|
||||||
IconButton(onClick = { viewModel.toggleSelectAll() }) {
|
IconButton(onClick = { viewModel.toggleSelectAll() }) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.SelectAll,
|
imageVector = AppIcons.SelectAll,
|
||||||
contentDescription = stringResource(R.string.select_all),
|
contentDescription = stringResource(R.string.select_all),
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
)
|
)
|
||||||
@@ -329,7 +327,7 @@ fun GalleryScreen(
|
|||||||
launcher.launch(buildSystemGalleryMediaPickIntent(context))
|
launcher.launch(buildSystemGalleryMediaPickIntent(context))
|
||||||
}) {
|
}) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.AddPhotoAlternate,
|
imageVector = AppIcons.AddPhotoAlternate,
|
||||||
contentDescription = stringResource(R.string.import_photo),
|
contentDescription = stringResource(R.string.import_photo),
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
)
|
)
|
||||||
@@ -436,7 +434,7 @@ fun GalleryScreen(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Output,
|
imageVector = AppIcons.Output,
|
||||||
contentDescription = stringResource(R.string.export),
|
contentDescription = stringResource(R.string.export),
|
||||||
tint = AccentOrange,
|
tint = AccentOrange,
|
||||||
modifier = Modifier.size(28.dp)
|
modifier = Modifier.size(28.dp)
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -51,6 +51,7 @@ import kotlinx.coroutines.launch
|
|||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import sh.calvin.reorderable.ReorderableItem
|
import sh.calvin.reorderable.ReorderableItem
|
||||||
import sh.calvin.reorderable.rememberReorderableLazyListState
|
import sh.calvin.reorderable.rememberReorderableLazyListState
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
private data class CategoryManagementItem(
|
private data class CategoryManagementItem(
|
||||||
val name: String,
|
val name: String,
|
||||||
@@ -443,7 +444,7 @@ fun FilterManagementScreen(
|
|||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = if (selectedIds.size == filteredLutList.size) Icons.Default.CheckBox else Icons.Default.CheckBoxOutlineBlank,
|
imageVector = if (selectedIds.size == filteredLutList.size) AppIcons.CheckBox else AppIcons.CheckBoxOutlineBlank,
|
||||||
contentDescription = "Select All",
|
contentDescription = "Select All",
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
)
|
)
|
||||||
@@ -455,7 +456,7 @@ fun FilterManagementScreen(
|
|||||||
showCategoryDialog = true
|
showCategoryDialog = true
|
||||||
}) {
|
}) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Label,
|
imageVector = AppIcons.Label,
|
||||||
contentDescription = "Batch Categorize",
|
contentDescription = "Batch Categorize",
|
||||||
tint = Color.White
|
tint = Color.White
|
||||||
)
|
)
|
||||||
@@ -1628,7 +1629,7 @@ private fun CategoryManagementSheet(
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.DragHandle,
|
imageVector = AppIcons.DragHandle,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.5f),
|
tint = Color.White.copy(alpha = 0.5f),
|
||||||
modifier = Modifier.draggableHandle().padding(4.dp)
|
modifier = Modifier.draggableHandle().padding(4.dp)
|
||||||
@@ -1850,7 +1851,7 @@ private fun FilterManagementItem(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.DragHandle,
|
imageVector = AppIcons.DragHandle,
|
||||||
contentDescription = "Drag to reorder",
|
contentDescription = "Drag to reorder",
|
||||||
tint = Color.White.copy(alpha = 0.5f),
|
tint = Color.White.copy(alpha = 0.5f),
|
||||||
modifier = dragModifier.size(24.dp)
|
modifier = dragModifier.size(24.dp)
|
||||||
@@ -1937,7 +1938,7 @@ private fun FilterManagementItem(
|
|||||||
modifier = Modifier.size(36.dp)
|
modifier = Modifier.size(36.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Tune,
|
imageVector = AppIcons.Tune,
|
||||||
contentDescription = stringResource(R.string.color_recipe),
|
contentDescription = stringResource(R.string.color_recipe),
|
||||||
tint = Color.White.copy(alpha = 0.8f),
|
tint = Color.White.copy(alpha = 0.8f),
|
||||||
modifier = Modifier.size(20.dp)
|
modifier = Modifier.size(20.dp)
|
||||||
@@ -1964,7 +1965,7 @@ private fun FilterManagementItem(
|
|||||||
// 分类修改 (所有滤镜可用)
|
// 分类修改 (所有滤镜可用)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(stringResource(R.string.category), color = Color.White) },
|
text = { Text(stringResource(R.string.category), color = Color.White) },
|
||||||
leadingIcon = { Icon(Icons.Default.Label, null, tint = Color.White.copy(alpha = 0.7f)) },
|
leadingIcon = { Icon(AppIcons.Label, null, tint = Color.White.copy(alpha = 0.7f)) },
|
||||||
onClick = {
|
onClick = {
|
||||||
showMenu = false
|
showMenu = false
|
||||||
onEditCategory?.invoke()
|
onEditCategory?.invoke()
|
||||||
@@ -1983,7 +1984,7 @@ private fun FilterManagementItem(
|
|||||||
},
|
},
|
||||||
leadingIcon = {
|
leadingIcon = {
|
||||||
Icon(
|
Icon(
|
||||||
if (lutInfo.isFavorite) Icons.Default.Star else Icons.Default.StarBorder,
|
if (lutInfo.isFavorite) Icons.Default.Star else AppIcons.StarBorder,
|
||||||
null,
|
null,
|
||||||
tint = Color(0xFFFFD700)
|
tint = Color(0xFFFFD700)
|
||||||
)
|
)
|
||||||
@@ -2010,7 +2011,7 @@ private fun FilterManagementItem(
|
|||||||
// 复制 (所有滤镜可用)
|
// 复制 (所有滤镜可用)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(stringResource(R.string.copy), color = Color.White) },
|
text = { Text(stringResource(R.string.copy), color = Color.White) },
|
||||||
leadingIcon = { Icon(Icons.Default.ContentCopy, null, tint = Color.White.copy(alpha = 0.7f)) },
|
leadingIcon = { Icon(AppIcons.ContentCopy, null, tint = Color.White.copy(alpha = 0.7f)) },
|
||||||
onClick = {
|
onClick = {
|
||||||
showMenu = false
|
showMenu = false
|
||||||
onCopy?.invoke()
|
onCopy?.invoke()
|
||||||
@@ -2020,7 +2021,7 @@ private fun FilterManagementItem(
|
|||||||
// 导出 (所有滤镜可用)
|
// 导出 (所有滤镜可用)
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(stringResource(R.string.export_lut_cube), color = Color.White) },
|
text = { Text(stringResource(R.string.export_lut_cube), color = Color.White) },
|
||||||
leadingIcon = { Icon(Icons.Default.Download, null, tint = Color.White.copy(alpha = 0.7f)) },
|
leadingIcon = { Icon(AppIcons.Download, null, tint = Color.White.copy(alpha = 0.7f)) },
|
||||||
onClick = {
|
onClick = {
|
||||||
showMenu = false
|
showMenu = false
|
||||||
onExport?.invoke()
|
onExport?.invoke()
|
||||||
|
|||||||
@@ -34,13 +34,8 @@ import androidx.compose.foundation.verticalScroll
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Add
|
import androidx.compose.material.icons.filled.Add
|
||||||
import androidx.compose.material.icons.filled.ContentCopy
|
|
||||||
import androidx.compose.material.icons.filled.Delete
|
import androidx.compose.material.icons.filled.Delete
|
||||||
import androidx.compose.material.icons.filled.DragHandle
|
|
||||||
import androidx.compose.material.icons.filled.Edit
|
import androidx.compose.material.icons.filled.Edit
|
||||||
import androidx.compose.material.icons.filled.Image
|
|
||||||
import androidx.compose.material.icons.filled.PhotoLibrary
|
|
||||||
import androidx.compose.material.icons.filled.ScreenRotation
|
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.ButtonDefaults
|
import androidx.compose.material3.ButtonDefaults
|
||||||
@@ -109,6 +104,7 @@ import kotlinx.coroutines.withContext
|
|||||||
import sh.calvin.reorderable.ReorderableItem
|
import sh.calvin.reorderable.ReorderableItem
|
||||||
import sh.calvin.reorderable.rememberReorderableLazyListState
|
import sh.calvin.reorderable.rememberReorderableLazyListState
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -498,7 +494,7 @@ private fun PreviewCard(
|
|||||||
modifier = Modifier.size(36.dp)
|
modifier = Modifier.size(36.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ScreenRotation,
|
imageVector = AppIcons.ScreenRotation,
|
||||||
contentDescription = if (portrait) {
|
contentDescription = if (portrait) {
|
||||||
stringResource(R.string.frame_editor_preview_landscape)
|
stringResource(R.string.frame_editor_preview_landscape)
|
||||||
} else {
|
} else {
|
||||||
@@ -662,7 +658,7 @@ private fun FrameBasicTab(
|
|||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.PhotoLibrary,
|
imageVector = AppIcons.PhotoLibrary,
|
||||||
contentDescription = null
|
contentDescription = null
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
@@ -1025,7 +1021,7 @@ private fun ElementListItem(
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.DragHandle,
|
imageVector = AppIcons.DragHandle,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.5f),
|
tint = Color.White.copy(alpha = 0.5f),
|
||||||
modifier = dragModifier.size(20.dp)
|
modifier = dragModifier.size(20.dp)
|
||||||
@@ -1063,7 +1059,7 @@ private fun ElementListItem(
|
|||||||
modifier = Modifier.size(32.dp)
|
modifier = Modifier.size(32.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.ContentCopy,
|
AppIcons.ContentCopy,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
modifier = Modifier.size(16.dp)
|
modifier = Modifier.size(16.dp)
|
||||||
@@ -1213,7 +1209,7 @@ private fun ElementEditor(
|
|||||||
onClick = { onImportLogo(element.draftId) },
|
onClick = { onImportLogo(element.draftId) },
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Icon(imageVector = Icons.Default.Image, contentDescription = null)
|
Icon(imageVector = AppIcons.Image, contentDescription = null)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
Text(stringResource(R.string.custom_import))
|
Text(stringResource(R.string.custom_import))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import kotlinx.coroutines.launch
|
|||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import sh.calvin.reorderable.ReorderableItem
|
import sh.calvin.reorderable.ReorderableItem
|
||||||
import sh.calvin.reorderable.rememberReorderableLazyListState
|
import sh.calvin.reorderable.rememberReorderableLazyListState
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 边框管理页面
|
* 边框管理页面
|
||||||
@@ -496,7 +497,7 @@ private fun FrameManagementItem(
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.DragHandle,
|
imageVector = AppIcons.DragHandle,
|
||||||
contentDescription = "Drag to reorder",
|
contentDescription = "Drag to reorder",
|
||||||
tint = Color.White.copy(alpha = 0.5f),
|
tint = Color.White.copy(alpha = 0.5f),
|
||||||
modifier = dragModifier.size(24.dp)
|
modifier = dragModifier.size(24.dp)
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ import androidx.compose.material.icons.Icons
|
|||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Add
|
import androidx.compose.material.icons.filled.Add
|
||||||
import androidx.compose.material.icons.filled.Delete
|
import androidx.compose.material.icons.filled.Delete
|
||||||
import androidx.compose.material.icons.filled.DragHandle
|
|
||||||
import androidx.compose.material.icons.filled.Edit
|
import androidx.compose.material.icons.filled.Edit
|
||||||
import androidx.compose.material.icons.filled.RestartAlt
|
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
import androidx.compose.material3.CardDefaults
|
import androidx.compose.material3.CardDefaults
|
||||||
@@ -60,6 +58,7 @@ import com.hinnka.mycamera.raw.RawRenderingEngine
|
|||||||
import com.hinnka.mycamera.viewmodel.CameraViewModel
|
import com.hinnka.mycamera.viewmodel.CameraViewModel
|
||||||
import sh.calvin.reorderable.ReorderableItem
|
import sh.calvin.reorderable.ReorderableItem
|
||||||
import sh.calvin.reorderable.rememberReorderableLazyListState
|
import sh.calvin.reorderable.rememberReorderableLazyListState
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -149,7 +148,7 @@ fun PresetManagementScreen(
|
|||||||
}
|
}
|
||||||
IconButton(onClick = { showRestoreDefaultsDialog = true }) {
|
IconButton(onClick = { showRestoreDefaultsDialog = true }) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.RestartAlt,
|
imageVector = AppIcons.RestartAlt,
|
||||||
contentDescription = stringResource(R.string.preset_restore_defaults),
|
contentDescription = stringResource(R.string.preset_restore_defaults),
|
||||||
tint = Color.White.copy(alpha = 0.8f)
|
tint = Color.White.copy(alpha = 0.8f)
|
||||||
)
|
)
|
||||||
@@ -262,7 +261,7 @@ private fun PresetManagementItem(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.DragHandle,
|
imageVector = AppIcons.DragHandle,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.45f),
|
tint = Color.White.copy(alpha = 0.45f),
|
||||||
modifier = dragModifier.size(28.dp)
|
modifier = dragModifier.size(28.dp)
|
||||||
|
|||||||
@@ -40,16 +40,9 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Article
|
|
||||||
import androidx.compose.material.icons.filled.Check
|
import androidx.compose.material.icons.filled.Check
|
||||||
import androidx.compose.material.icons.filled.ChevronRight
|
|
||||||
import androidx.compose.material.icons.filled.ExpandLess
|
|
||||||
import androidx.compose.material.icons.filled.ExpandMore
|
|
||||||
import androidx.compose.material.icons.filled.Add
|
import androidx.compose.material.icons.filled.Add
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Visibility
|
|
||||||
import androidx.compose.material.icons.filled.VisibilityOff
|
|
||||||
import androidx.compose.material.icons.filled.FilterNone
|
|
||||||
import androidx.compose.material.ripple.RippleAlpha
|
import androidx.compose.material.ripple.RippleAlpha
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
@@ -142,6 +135,7 @@ import com.hinnka.mycamera.viewmodel.CameraViewModel
|
|||||||
import com.hinnka.mycamera.video.VideoRecordingPath
|
import com.hinnka.mycamera.video.VideoRecordingPath
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import com.hinnka.mycamera.ui.icons.AppIcons
|
||||||
|
|
||||||
enum class SettingsTab {
|
enum class SettingsTab {
|
||||||
CAMERA, IMAGING, RAW, PHANTOM, SYSTEM
|
CAMERA, IMAGING, RAW, PHANTOM, SYSTEM
|
||||||
@@ -2158,7 +2152,7 @@ fun SettingsScreen(
|
|||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Article,
|
imageVector = AppIcons.Article,
|
||||||
contentDescription = stringResource(R.string.logs),
|
contentDescription = stringResource(R.string.logs),
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
@@ -2496,13 +2490,13 @@ fun SettingsSection(
|
|||||||
}
|
}
|
||||||
if (isExpanded) {
|
if (isExpanded) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ExpandLess,
|
imageVector = AppIcons.ExpandLess,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ExpandMore,
|
imageVector = AppIcons.ExpandMore,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
@@ -2933,7 +2927,7 @@ fun TextInputSettingItem(
|
|||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.4f)
|
tint = Color.White.copy(alpha = 0.4f)
|
||||||
)
|
)
|
||||||
@@ -3036,7 +3030,7 @@ fun DropdownSettingItem(
|
|||||||
|
|
||||||
Box {
|
Box {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ExpandMore,
|
imageVector = AppIcons.ExpandMore,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.4f)
|
tint = Color.White.copy(alpha = 0.4f)
|
||||||
)
|
)
|
||||||
@@ -3130,7 +3124,7 @@ fun BaselineColorCorrectionSettingItem(
|
|||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f)
|
tint = Color.White.copy(alpha = 0.6f)
|
||||||
)
|
)
|
||||||
@@ -3184,7 +3178,7 @@ fun NavigationSettingItem(
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.ChevronRight,
|
imageVector = AppIcons.ChevronRight,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = if (enabled) 0.6f else 0.3f)
|
tint = Color.White.copy(alpha = if (enabled) 0.6f else 0.3f)
|
||||||
)
|
)
|
||||||
@@ -3320,7 +3314,7 @@ private fun FrameItem(
|
|||||||
) {
|
) {
|
||||||
if (isNone) {
|
if (isNone) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.FilterNone,
|
imageVector = AppIcons.FilterNone,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.7f),
|
tint = Color.White.copy(alpha = 0.7f),
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
@@ -4330,7 +4324,7 @@ private fun CustomBackgroundItem(
|
|||||||
) {
|
) {
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.FilterNone,
|
imageVector = AppIcons.FilterNone,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = Color.White.copy(alpha = 0.6f),
|
tint = Color.White.copy(alpha = 0.6f),
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
@@ -4410,7 +4404,7 @@ private fun FocalLengthChip(
|
|||||||
)
|
)
|
||||||
if (!isCustom) {
|
if (!isCustom) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = if (isHidden) Icons.Default.VisibilityOff else Icons.Default.Visibility,
|
imageVector = if (isHidden) AppIcons.VisibilityOff else AppIcons.Visibility,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (isSelected) Color.White else if (isHidden) Color.White.copy(alpha = 0.3f) else Color.White.copy(alpha = 0.5f),
|
tint = if (isSelected) Color.White else if (isHidden) Color.White.copy(alpha = 0.3f) else Color.White.copy(alpha = 0.5f),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h360q-20 26-30 57t-10 63q0 83 58.5 141.5T720-520q32 0 63-10t57-30v360q0 33-23.5 56.5T760-120H200Zm40-160h480L570-480 450-320l-90-120-120 160Zm440-320v-80h-80v-80h80v-80h80v80h80v80h-80v80h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:autoMirrored="true">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M560-280 360-480l200-200v400Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:autoMirrored="true">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M400-280v-400l200 200-200 200Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" android:autoMirrored="true">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M640-160v-280h160v280H640Zm-240 0v-640h160v640H400Zm-240 0v-440h160v440H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m320-80 40-280H160l360-520h80l-40 320h240L400-80h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<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="@android:color/black" android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M120-120v-80h720v80H120Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M40-200v-560h80v560H40Zm160 0v-560h80v560h-80Zm240 0q-33 0-56.5-23.5T360-280v-400q0-33 23.5-56.5T440-760h400q33 0 56.5 23.5T920-680v400q0 33-23.5 56.5T840-200H440Zm40-160h320L696-500l-76 100-56-74-84 114Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M80-120v-720h400v160h400v560H80Zm80-80h80v-80h-80v80Zm0-160h80v-80h-80v80Zm0-160h80v-80h-80v80Zm0-160h80v-80h-80v80Zm160 480h80v-80h-80v80Zm0-160h80v-80h-80v80Zm0-160h80v-80h-80v80Zm0-160h80v-80h-80v80Zm160 480h320v-400H480v80h80v80h-80v80h80v80h-80v80Zm160-240v-80h80v80h-80Zm0 160v-80h80v80h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M480-260q75 0 127.5-52.5T660-440q0-75-52.5-127.5T480-620q-75 0-127.5 52.5T300-440q0 75 52.5 127.5T480-260Zm0-80q-42 0-71-29t-29-71q0-42 29-71t71-29q42 0 71 29t29 71q0 42-29 71t-71 29ZM160-120q-33 0-56.5-23.5T80-200v-480q0-33 23.5-56.5T160-760h126l74-80h240l74 80h126q33 0 56.5 23.5T880-680v480q0 33-23.5 56.5T800-120H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M320-280q-33 0-56.5-23.5T240-360v-240q0-33 23.5-56.5T320-680h40l40-40h160l40 40h40q33 0 56.5 23.5T720-600v240q0 33-23.5 56.5T640-280H320Zm160-120q33 0 56.5-23.5T560-480q0-33-23.5-56.5T480-560q-33 0-56.5 23.5T400-480q0 33 23.5 56.5T480-400ZM342-940q34-11 68.5-15.5T480-960q94 0 177.5 33.5t148 93Q870-774 911-693.5T960-520h-80q-7-72-38-134.5T762.5-765Q714-813 651-842.5T516-878l62 62-56 56-180-180ZM618-20Q584-9 549.5-4.5T480 0q-94 0-177.5-33.5t-148-93Q90-186 49-266.5T0-440h80q8 72 38.5 134.5t79 110.5Q246-147 309-117.5T444-82l-62-62 56-56L618-20Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m424-312 282-282-56-56-226 226-114-114-56 56 170 170ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M324-111.5Q251-143 197-197t-85.5-127Q80-397 80-480t31.5-156Q143-709 197-763t127-85.5Q397-880 480-880t156 31.5Q709-817 763-763t85.5 127Q880-563 880-480t-31.5 156Q817-251 763-197t-127 85.5Q563-80 480-80t-156-31.5ZM520-163q119-15 199.5-104.5T800-480q0-123-80.5-212.5T520-797v634Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-280q-33 0-56.5-23.5T120-360v-240q0-33 23.5-56.5T200-680h560q33 0 56.5 23.5T840-600v240q0 33-23.5 56.5T760-280H200Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m280-40 112-564-72 28v136h-80v-188l202-86q14-6 29.5-7t29.5 4q14 5 26.5 14t20.5 23l40 64q26 42 70.5 69T760-520v80q-70 0-125-29t-94-74l-25 123 84 80v300h-80v-260l-84-64-72 324h-84Zm203.5-723.5Q460-787 460-820t23.5-56.5Q507-900 540-900t56.5 23.5Q620-853 620-820t-23.5 56.5Q573-740 540-740t-56.5-23.5Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M160-360v-80h640v80H160Zm0-160v-80h640v80H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M160-80q-33 0-56.5-23.5T80-160v-560q0-33 23.5-56.5T160-800h160l160-160 160 160h160q33 0 56.5 23.5T880-720v560q0 33-23.5 56.5T800-80H160Zm0-80h640v-560H160v560Zm80-80v-400h480v400H240Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M320-240q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M381-116q-44-36-55-92-53 17-107-2t-83-66q-30-48-22-106.5t52-97.5q-42-38-50.5-94T134-678q27-48 81.5-69.5T324-752q11-56 55-92t101-36q57 0 101 36t55 92q56-17 108.5 3t81.5 71q27 50 19.5 104.5T794-480q44 39 52.5 96.5T828-276q-29 51-81.5 68T638-208q-11 56-55 92T482-80q-57 0-101-36Zm99-204q66 0 113-47t47-113q0-66-47-113t-113-47q-66 0-113 47t-47 113q0 66 47 113t113 47Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-120v-680h360l16 80h224v400H520l-16-80H280v280h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M280-880h400l-80 280h160L643-431 280-794v-86ZM400-80v-320H280v-166L55-791l57-57 736 736-57 57-241-241L400-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M400-80v-320H280v-480h400l-80 280h160L400-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M320-80v-448L56-792l56-56 736 736-56 56-152-152v128H320Zm-80-754v-46h480v120H314l-74-74Zm400 400L394-680h326v40l-80 120v86Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M240-760v-120h480v120H240Zm282.5 402.5Q540-375 540-400t-17.5-42.5Q505-460 480-460t-42.5 17.5Q420-425 420-400t17.5 42.5Q455-340 480-340t42.5-17.5ZM320-80v-440l-80-120v-40h480v40l-80 120v440H320Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M240-160q-33 0-56.5-23.5T160-240q0-33 23.5-56.5T240-320q33 0 56.5 23.5T320-240q0 33-23.5 56.5T240-160Zm320 0q-33 0-56.5-23.5T480-240q0-33 23.5-56.5T560-320q33 0 56.5 23.5T640-240q0 33-23.5 56.5T560-160ZM400-320q-33 0-56.5-23.5T320-400q0-33 23.5-56.5T400-480q33 0 56.5 23.5T480-400q0 33-23.5 56.5T400-320Zm320 0q-33 0-56.5-23.5T640-400q0-33 23.5-56.5T720-480q33 0 56.5 23.5T800-400q0 33-23.5 56.5T720-320ZM240-480q-33 0-56.5-23.5T160-560q0-33 23.5-56.5T240-640q33 0 56.5 23.5T320-560q0 33-23.5 56.5T240-480Zm320 0q-33 0-56.5-23.5T480-560q0-33 23.5-56.5T560-640q33 0 56.5 23.5T640-560q0 33-23.5 56.5T560-480ZM400-640q-33 0-56.5-23.5T320-720q0-33 23.5-56.5T400-800q33 0 56.5 23.5T480-720q0 33-23.5 56.5T400-640Zm320 0q-33 0-56.5-23.5T640-720q0-33 23.5-56.5T720-800q33 0 56.5 23.5T800-720q0 33-23.5 56.5T720-640Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M120-520v-320h320v320H120Zm0 400v-320h320v320H120Zm400-400v-320h320v320H520Zm0 400v-320h320v320H520Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm40-160h480L570-480 450-320l-90-120-120 160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560L200-200Zm380-40v-80h-80v-60h80v-80h60v80h80v60h-80v80h-60ZM240-620h200v-60H240v60Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="20" android:viewportHeight="20" android:autoMirrored="true">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M13.63,4H4c-1.1,0 -2,0.9 -2,2v8c0,1.1 0.9,2 2,2h9.63c0.6,0 1.14,-0.29 1.46,-0.72L19,10l-3.91,-5.28c-0.32,-0.43 -0.85,-0.72 -1.46,-0.72z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M480-118 120-398l66-50 294 228 294-228 66 50-360 280Zm0-202L120-600l360-280 360 280-360 280Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<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="@android:color/black" android:pathData="M21,11l0,-8l-8,0l3.29,3.29l-10,10l-3.29,-3.29l0,8l8,0l-3.29,-3.29l10,-10z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:autoMirrored="true">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M280-200v-80h284q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l104 104-56 56-200-200 200-200 56 56-104 104h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H280Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="20" android:viewportHeight="20">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M14,14l4,-4l-4,-4l-1.06,1.06l2.19,2.19l-7.13,0l0,1.5l7.13,0l-2.19,2.19z" />
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M15.5,15.5h-11v-11h11V6H17V4.5C17,3.67 16.33,3 15.5,3h-11C3.67,3 3,3.67 3,4.5v11C3,16.33 3.67,17 4.5,17h11c0.83,0 1.5,-0.67 1.5,-1.5V14h-1.5V15.5z" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 32.5-156t88-127Q256-817 330-848.5T488-880q80 0 151 27.5t124.5 76q53.5 48.5 85 115T880-518q0 115-70 176.5T640-280h-74q-9 0-12.5 5t-3.5 11q0 12 15 34.5t15 51.5q0 50-27.5 74T480-80ZM303-457q17-17 17-43t-17-43q-17-17-43-17t-43 17q-17 17-17 43t17 43q17 17 43 17t43-17Zm120-160q17-17 17-43t-17-43q-17-17-43-17t-43 17q-17 17-17 43t17 43q17 17 43 17t43-17Zm200 0q17-17 17-43t-17-43q-17-17-43-17t-43 17q-17 17-17 43t17 43q17 17 43 17t43-17Zm120 160q17-17 17-43t-17-43q-17-17-43-17t-43 17q-17 17-17 43t17 43q17 17 43 17t43-17Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M560-200v-560h160v560H560Zm-320 0v-560h160v560H240Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm40-160h480L570-480 450-320l-90-120-120 160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M360-400h400L622-580l-92 120-62-80-108 140Zm-40 160q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M440-280h320v-240H440v240ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M324-111.5Q251-143 197-197t-85.5-127Q80-397 80-480t31.5-156Q143-709 197-763t127-85.5Q397-880 480-880t156 31.5Q709-817 763-763t85.5 127Q880-563 880-480t-31.5 156Q817-251 763-197t-127 85.5Q563-80 480-80t-156-31.5ZM440-162v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q41-45 62.5-100.5T800-480q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m640-480 80 80v80H520v240l-40 40-40-40v-240H240v-80l80-80v-280h-40v-80h400v80h-40v280Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M440-122q-121-15-200.5-105.5T160-440q0-66 26-126.5T260-672l57 57q-38 34-57.5 79T240-440q0 88 56 155.5T440-202v80Zm80 0v-80q87-16 143.5-83T720-440q0-100-70-170t-170-70h-3l44 44-56 56-140-140 140-140 56 56-44 44h3q134 0 227 93t93 227q0 121-79.5 211.5T520-122Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M480 0q-99 0-186.5-37.5t-153-103Q75-206 37.5-293.5T0-480h80q0 71 24 136t66.5 117Q213-175 272-138.5T401-87L296-192l56-56L588-12q-26 6-53.5 9T480 0Zm400-480q0-71-24-136t-66.5-117Q747-785 688-821.5T559-873l105 105-56 56-236-236q26-6 53.5-9t54.5-3q99 0 186.5 37.5t153 103q65.5 65.5 103 153T960-480h-80ZM496.05-182 182-496q-10.52-11-16.26-25-5.74-14-5.74-29t5.74-29q5.74-14 16.26-25l173.62-174q11.03-11 25.08-16.5 14.05-5.5 29.11-5.5 15.05 0 29.1 5.5T464-778l313.97 313.97Q789-453 794.5-439q5.5 14 5.5 29t-5.74 29q-5.74 14-16.26 25L604.42-182q-11.04 11-25.09 16.5-14.04 5.5-29.09 5.5t-29.1-5.5q-14.05-5.5-25.09-16.5ZM373-556q13 0 21.5-9t8.5-21q0-13-8.5-21.5T373-616q-12 0-21 8.5t-9 21.5q0 12 9 21t21 9Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M280-280v-400h400v400H280Zm80-80h240v-240H360v240ZM200-200v80q-33 0-56.5-23.5T120-200h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm80-160h-80q0-33 23.5-56.5T200-840v80Zm80 640v-80h80v80h-80Zm0-640v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-640v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-640v-80h80v80h-80Zm160 640v-80h80q0 33-23.5 56.5T760-120Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80q33 0 56.5 23.5T840-760h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M560-160v-80h104L537-367l57-57 126 126v-102h80v240H560Zm-344 0-56-56 504-504H560v-80h240v240h-80v-104L216-160Zm151-377L160-744l56-56 207 207-56 56Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M240-240v-480h480v480H240Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M280-160 80-360l200-200 56 57-103 103h287v80H233l103 103-56 57Zm400-240-56-57 103-103H440v-80h287L624-743l56-57 200 200-200 200Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm-99.5 291.5Q275-137 226-186t-77.5-114.5Q120-366 120-440t28.5-139.5Q177-645 226-694t114.5-77.5Q406-800 480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80q-74 0-139.5-28.5Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M320-120q-33 0-56.5-23.5T240-200v-560q0-33 23.5-56.5T320-840h320q33 0 56.5 23.5T720-760v560q0 33-23.5 56.5T640-120H320Zm188.5-531.5Q520-663 520-680t-11.5-28.5Q497-720 480-720t-28.5 11.5Q440-697 440-680t11.5 28.5Q463-640 480-640t28.5-11.5ZM0-360v-240h80v240H0Zm120 80v-400h80v400h-80Zm760-80v-240h80v240h-80Zm-120 80v-400h80v400h-80Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h480q33 0 56.5 23.5T720-720v180l160-160v440L720-420v180q0 33-23.5 56.5T640-160H160Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M607.5-372.5Q660-425 660-500t-52.5-127.5Q555-680 480-680t-127.5 52.5Q300-575 300-500t52.5 127.5Q405-320 480-320t127.5-52.5Zm-204-51Q372-455 372-500t31.5-76.5Q435-608 480-608t76.5 31.5Q588-545 588-500t-31.5 76.5Q525-392 480-392t-76.5-31.5ZM214-281.5Q94-363 40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200q-146 0-266-81.5Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960">
|
||||||
|
<group android:translateY="960">
|
||||||
|
<path android:fillColor="@android:color/black" android:pathData="M792-56 624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM480-320q11 0 20.5-1t20.5-4L305-541q-3 11-4 20.5t-1 20.5q0 75 52.5 127.5T480-320Zm292 18L645-428q7-17 11-34.5t4-37.5q0-75-52.5-127.5T480-680q-20 0-37.5 4T408-664L306-766q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302ZM587-486 467-606q28-5 51.5 4.5T559-574q17 18 24.5 41.5T587-486Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -9,7 +9,7 @@ lifecycleRuntimeKtx = "2.10.0"
|
|||||||
activityCompose = "1.12.2"
|
activityCompose = "1.12.2"
|
||||||
composeBom = "2025.12.01"
|
composeBom = "2025.12.01"
|
||||||
lifecycleViewmodelCompose = "2.10.0"
|
lifecycleViewmodelCompose = "2.10.0"
|
||||||
materialIconsExtended = "1.7.8"
|
materialIcons = "1.7.8"
|
||||||
coil = "2.7.0"
|
coil = "2.7.0"
|
||||||
navigationCompose = "2.9.6"
|
navigationCompose = "2.9.6"
|
||||||
exifinterface = "1.4.2"
|
exifinterface = "1.4.2"
|
||||||
@@ -51,7 +51,7 @@ androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-man
|
|||||||
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
||||||
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
|
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
|
||||||
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
|
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
|
||||||
androidx-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "materialIconsExtended" }
|
androidx-material-icons-core = { group = "androidx.compose.material", name = "material-icons-core", version.ref = "materialIcons" }
|
||||||
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }
|
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }
|
||||||
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigationCompose" }
|
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigationCompose" }
|
||||||
androidx-exifinterface = { group = "androidx.exifinterface", name = "exifinterface", version.ref = "exifinterface" }
|
androidx-exifinterface = { group = "androidx.exifinterface", name = "exifinterface", version.ref = "exifinterface" }
|
||||||
|
|||||||
@@ -0,0 +1,568 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Import only the Material Icons used by the app as local Android vector drawables.
|
||||||
|
|
||||||
|
The script is intended to help remove the heavy Compose material-icons-extended
|
||||||
|
dependency. By default it only prints a plan. Pass --write to create drawable XML
|
||||||
|
files for icons that are referenced by the source code but not provided by
|
||||||
|
material-icons-core.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
import zipfile
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
ANDROID_NS = "http://schemas.android.com/apk/res/android"
|
||||||
|
ET.register_namespace("android", ANDROID_NS)
|
||||||
|
|
||||||
|
REPO_OWNER = "google"
|
||||||
|
REPO_NAME = "material-design-icons"
|
||||||
|
REPO_REF = "master"
|
||||||
|
GITHUB_TREE_URL = (
|
||||||
|
f"https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/git/trees/{REPO_REF}?recursive=1"
|
||||||
|
)
|
||||||
|
RAW_BASE_URL = f"https://raw.githubusercontent.com/{REPO_OWNER}/{REPO_NAME}/{REPO_REF}/"
|
||||||
|
SYMBOLS_BASE_URL = "https://fonts.gstatic.com/s/i/short-term/release"
|
||||||
|
|
||||||
|
STYLE_TO_REPO_DIR = {
|
||||||
|
"filled": "materialicons",
|
||||||
|
"outlined": "materialiconsoutlined",
|
||||||
|
"rounded": "materialiconsround",
|
||||||
|
"sharp": "materialiconssharp",
|
||||||
|
"twotone": "materialiconstwotone",
|
||||||
|
}
|
||||||
|
REPO_DIR_TO_STYLE = {value: key for key, value in STYLE_TO_REPO_DIR.items()}
|
||||||
|
|
||||||
|
STYLE_ALIASES = {
|
||||||
|
"Default": "filled",
|
||||||
|
"Filled": "filled",
|
||||||
|
"Outlined": "outlined",
|
||||||
|
"Rounded": "rounded",
|
||||||
|
"Sharp": "sharp",
|
||||||
|
"TwoTone": "twotone",
|
||||||
|
"filled": "filled",
|
||||||
|
"outlined": "outlined",
|
||||||
|
"rounded": "rounded",
|
||||||
|
"sharp": "sharp",
|
||||||
|
"twotone": "twotone",
|
||||||
|
}
|
||||||
|
|
||||||
|
ICON_IMPORT_RE = re.compile(
|
||||||
|
r"^import\s+androidx\.compose\.material\.icons\."
|
||||||
|
r"(?:(automirrored)\.)?"
|
||||||
|
r"(filled|outlined|rounded|sharp|twotone)\."
|
||||||
|
r"([A-Za-z][A-Za-z0-9_]*|\*)\s*$",
|
||||||
|
re.MULTILINE,
|
||||||
|
)
|
||||||
|
ICON_USAGE_RE = re.compile(
|
||||||
|
r"Icons\.(Default|Filled|Outlined|Rounded|Sharp|TwoTone)\.([A-Za-z][A-Za-z0-9_]*)"
|
||||||
|
)
|
||||||
|
AUTO_ICON_USAGE_RE = re.compile(
|
||||||
|
r"Icons\.AutoMirrored\.(Filled|Outlined|Rounded|Sharp|TwoTone)\.([A-Za-z][A-Za-z0-9_]*)"
|
||||||
|
)
|
||||||
|
CORE_CLASS_RE = re.compile(
|
||||||
|
r"androidx/compose/material/icons/(?:(automirrored)/)?"
|
||||||
|
r"(filled|outlined|rounded|sharp|twotone)/([A-Za-z][A-Za-z0-9_]*)Kt\.class$"
|
||||||
|
)
|
||||||
|
ANDROID_VECTOR_RE = re.compile(
|
||||||
|
r"^android/([^/]+)/([^/]+)/([^/]+)/black/res/drawable[^/]*/([^/]+\.xml)$"
|
||||||
|
)
|
||||||
|
SVG_NS = "http://www.w3.org/2000/svg"
|
||||||
|
|
||||||
|
SYMBOLS_STYLE_TO_FAMILY = {
|
||||||
|
"filled": "materialsymbolsoutlined",
|
||||||
|
"outlined": "materialsymbolsoutlined",
|
||||||
|
"rounded": "materialsymbolsrounded",
|
||||||
|
"sharp": "materialsymbolssharp",
|
||||||
|
"twotone": "materialsymbolsoutlined",
|
||||||
|
}
|
||||||
|
SPECIAL_COMPOSE_TO_SOURCE = {
|
||||||
|
"Crop169": "crop_16_9",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True, order=True)
|
||||||
|
class IconRef:
|
||||||
|
name: str
|
||||||
|
style: str
|
||||||
|
auto_mirrored: bool = False
|
||||||
|
|
||||||
|
@property
|
||||||
|
def display_name(self) -> str:
|
||||||
|
prefix = "AutoMirrored." if self.auto_mirrored else ""
|
||||||
|
return f"{prefix}{self.style}.{self.name}"
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class RepoIcon:
|
||||||
|
icon: IconRef
|
||||||
|
path: str
|
||||||
|
source_name: str
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Import used Compose Material Icons as local vector drawables."
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--source-root",
|
||||||
|
action="append",
|
||||||
|
type=Path,
|
||||||
|
default=None,
|
||||||
|
help="Kotlin source root to scan. Can be passed more than once.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--output-dir",
|
||||||
|
type=Path,
|
||||||
|
default=Path("app/src/main/res/drawable"),
|
||||||
|
help="Drawable output directory.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--repo",
|
||||||
|
type=Path,
|
||||||
|
help="Optional local clone of google/material-design-icons.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--cache-dir",
|
||||||
|
type=Path,
|
||||||
|
default=Path("build/material_icons_importer"),
|
||||||
|
help="Cache directory for GitHub tree metadata and downloaded XML.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--core-jar",
|
||||||
|
type=Path,
|
||||||
|
help="Optional path to material-icons-core classes.jar.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--all-used",
|
||||||
|
action="store_true",
|
||||||
|
help="Import every used icon instead of only icons missing from material-icons-core.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--include-core-covered",
|
||||||
|
action="store_true",
|
||||||
|
help="Print core-covered icons in the report.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--write",
|
||||||
|
action="store_true",
|
||||||
|
help="Write drawable XML files. Without this flag the script only prints a plan.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--overwrite",
|
||||||
|
action="store_true",
|
||||||
|
help="Overwrite existing drawable XML files.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--no-github",
|
||||||
|
action="store_true",
|
||||||
|
help="Do not query GitHub. Requires --repo if --write needs icons.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--no-symbols",
|
||||||
|
action="store_true",
|
||||||
|
help="Do not fall back to Google Fonts Material Symbols SVGs.",
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
project_root = Path.cwd()
|
||||||
|
source_roots = args.source_root or [
|
||||||
|
Path("app/src/main/java"),
|
||||||
|
Path("app/src/default/java"),
|
||||||
|
]
|
||||||
|
source_roots = [root if root.is_absolute() else project_root / root for root in source_roots]
|
||||||
|
output_dir = args.output_dir if args.output_dir.is_absolute() else project_root / args.output_dir
|
||||||
|
cache_dir = args.cache_dir if args.cache_dir.is_absolute() else project_root / args.cache_dir
|
||||||
|
|
||||||
|
used_icons = scan_used_icons(source_roots)
|
||||||
|
core_icons = load_core_icons(args.core_jar)
|
||||||
|
|
||||||
|
if args.all_used:
|
||||||
|
icons_to_import = sorted(used_icons)
|
||||||
|
else:
|
||||||
|
icons_to_import = sorted(icon for icon in used_icons if icon not in core_icons)
|
||||||
|
core_covered = sorted(icon for icon in used_icons if icon in core_icons)
|
||||||
|
|
||||||
|
print(f"Scanned icons: {len(used_icons)}")
|
||||||
|
print(f"Covered by material-icons-core: {len(core_covered)}")
|
||||||
|
print(f"Need local drawable import: {len(icons_to_import)}")
|
||||||
|
|
||||||
|
if args.include_core_covered and core_covered:
|
||||||
|
print()
|
||||||
|
print("Core-covered icons:")
|
||||||
|
for icon in core_covered:
|
||||||
|
print(f" {icon.display_name}")
|
||||||
|
|
||||||
|
if not icons_to_import:
|
||||||
|
return 0
|
||||||
|
|
||||||
|
repo_index: dict[tuple[str, str], RepoIcon] = {}
|
||||||
|
if args.repo:
|
||||||
|
repo_root = args.repo if args.repo.is_absolute() else project_root / args.repo
|
||||||
|
repo_index.update(index_local_repo(repo_root))
|
||||||
|
if not repo_index and not args.no_github:
|
||||||
|
repo_index.update(load_github_index(cache_dir))
|
||||||
|
|
||||||
|
print()
|
||||||
|
print("Local drawable imports:")
|
||||||
|
|
||||||
|
imported = 0
|
||||||
|
skipped = 0
|
||||||
|
unresolved: list[IconRef] = []
|
||||||
|
mapping: dict[str, str] = {}
|
||||||
|
for icon in icons_to_import:
|
||||||
|
repo_icon = resolve_repo_icon(repo_index, icon)
|
||||||
|
if repo_icon is None and not args.no_symbols:
|
||||||
|
repo_icon = material_symbol_icon(icon)
|
||||||
|
if repo_icon is None:
|
||||||
|
unresolved.append(icon)
|
||||||
|
print(f" MISSING {icon.display_name}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
drawable_name = drawable_resource_name(icon, repo_icon.source_name)
|
||||||
|
output_path = output_dir / f"{drawable_name}.xml"
|
||||||
|
mapping[icon.display_name] = f"R.drawable.{drawable_name}"
|
||||||
|
|
||||||
|
status = "would write"
|
||||||
|
if output_path.exists() and not args.overwrite:
|
||||||
|
status = "exists"
|
||||||
|
skipped += 1
|
||||||
|
elif args.write:
|
||||||
|
xml_text = read_repo_icon_xml(repo_icon.path, args.repo, cache_dir)
|
||||||
|
normalized = normalize_vector_xml(xml_text, auto_mirrored=icon.auto_mirrored)
|
||||||
|
output_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
output_path.write_text(normalized, encoding="utf-8", newline="\n")
|
||||||
|
status = "wrote"
|
||||||
|
imported += 1
|
||||||
|
print(f" {status:11} {icon.display_name} -> {output_path.relative_to(project_root)}")
|
||||||
|
|
||||||
|
if args.write:
|
||||||
|
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
mapping_path = cache_dir / "imported-icons.json"
|
||||||
|
mapping_path.write_text(
|
||||||
|
json.dumps(mapping, indent=2, sort_keys=True) + "\n",
|
||||||
|
encoding="utf-8",
|
||||||
|
newline="\n",
|
||||||
|
)
|
||||||
|
print()
|
||||||
|
print(f"Wrote mapping: {mapping_path.relative_to(project_root)}")
|
||||||
|
|
||||||
|
if unresolved:
|
||||||
|
print()
|
||||||
|
print("Unresolved icons:")
|
||||||
|
for icon in unresolved:
|
||||||
|
print(f" {icon.display_name}")
|
||||||
|
|
||||||
|
print()
|
||||||
|
print(f"Imported: {imported}; existing/skipped: {skipped}; unresolved: {len(unresolved)}")
|
||||||
|
if not args.write:
|
||||||
|
print("Dry run only. Re-run with --write to create drawable XML files.")
|
||||||
|
|
||||||
|
return 1 if unresolved else 0
|
||||||
|
|
||||||
|
|
||||||
|
def scan_used_icons(source_roots: Iterable[Path]) -> set[IconRef]:
|
||||||
|
icons: set[IconRef] = set()
|
||||||
|
for root in source_roots:
|
||||||
|
if not root.exists():
|
||||||
|
continue
|
||||||
|
for source in root.rglob("*.kt"):
|
||||||
|
text = source.read_text(encoding="utf-8", errors="ignore")
|
||||||
|
for match in ICON_IMPORT_RE.finditer(text):
|
||||||
|
auto_group, style_group, icon_name = match.groups()
|
||||||
|
if icon_name == "*":
|
||||||
|
continue
|
||||||
|
icons.add(
|
||||||
|
IconRef(
|
||||||
|
name=icon_name,
|
||||||
|
style=STYLE_ALIASES[style_group],
|
||||||
|
auto_mirrored=bool(auto_group),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
for match in ICON_USAGE_RE.finditer(text):
|
||||||
|
style_group, icon_name = match.groups()
|
||||||
|
icons.add(IconRef(name=icon_name, style=STYLE_ALIASES[style_group]))
|
||||||
|
for match in AUTO_ICON_USAGE_RE.finditer(text):
|
||||||
|
style_group, icon_name = match.groups()
|
||||||
|
icons.add(
|
||||||
|
IconRef(
|
||||||
|
name=icon_name,
|
||||||
|
style=STYLE_ALIASES[style_group],
|
||||||
|
auto_mirrored=True,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return icons
|
||||||
|
|
||||||
|
|
||||||
|
def load_core_icons(core_jar: Path | None) -> set[IconRef]:
|
||||||
|
jar_path = core_jar or find_material_icons_core_jar()
|
||||||
|
if jar_path is None or not jar_path.exists():
|
||||||
|
print("Warning: material-icons-core classes.jar was not found; treating all icons as missing.")
|
||||||
|
return set()
|
||||||
|
|
||||||
|
icons: set[IconRef] = set()
|
||||||
|
with zipfile.ZipFile(jar_path) as jar:
|
||||||
|
for entry in jar.namelist():
|
||||||
|
match = CORE_CLASS_RE.match(entry)
|
||||||
|
if not match:
|
||||||
|
continue
|
||||||
|
auto_group, style_group, icon_name = match.groups()
|
||||||
|
icons.add(
|
||||||
|
IconRef(
|
||||||
|
name=icon_name,
|
||||||
|
style=STYLE_ALIASES[style_group],
|
||||||
|
auto_mirrored=bool(auto_group),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return icons
|
||||||
|
|
||||||
|
|
||||||
|
def find_material_icons_core_jar() -> Path | None:
|
||||||
|
user_profile = Path(os.environ.get("USERPROFILE", Path.home()))
|
||||||
|
candidates: list[Path] = []
|
||||||
|
transform_root = user_profile / ".gradle" / "caches"
|
||||||
|
if transform_root.exists():
|
||||||
|
candidates.extend(
|
||||||
|
path
|
||||||
|
for path in transform_root.glob("*/transforms/**/material-icons-core*/jars/classes.jar")
|
||||||
|
if path.is_file()
|
||||||
|
)
|
||||||
|
candidates.sort(key=lambda path: path.stat().st_mtime, reverse=True)
|
||||||
|
return candidates[0] if candidates else None
|
||||||
|
|
||||||
|
|
||||||
|
def index_local_repo(repo_root: Path) -> dict[tuple[str, str], RepoIcon]:
|
||||||
|
if not repo_root.exists():
|
||||||
|
raise FileNotFoundError(f"Material icons repo not found: {repo_root}")
|
||||||
|
|
||||||
|
index: dict[tuple[str, str], RepoIcon] = {}
|
||||||
|
android_root = repo_root / "android"
|
||||||
|
for path in android_root.rglob("*.xml"):
|
||||||
|
relative = path.relative_to(repo_root).as_posix()
|
||||||
|
add_repo_icon(index, relative)
|
||||||
|
return index
|
||||||
|
|
||||||
|
|
||||||
|
def load_github_index(cache_dir: Path) -> dict[tuple[str, str], RepoIcon]:
|
||||||
|
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
cache_path = cache_dir / "github-tree.json"
|
||||||
|
if cache_path.exists():
|
||||||
|
data = json.loads(cache_path.read_text(encoding="utf-8"))
|
||||||
|
else:
|
||||||
|
request = urllib.request.Request(GITHUB_TREE_URL, headers={"User-Agent": "PhotonCamera-icon-importer"})
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(request, timeout=60) as response:
|
||||||
|
data = json.loads(response.read().decode("utf-8"))
|
||||||
|
except urllib.error.URLError as exc:
|
||||||
|
raise RuntimeError(f"Unable to fetch GitHub tree: {exc}") from exc
|
||||||
|
cache_path.write_text(json.dumps(data), encoding="utf-8", newline="\n")
|
||||||
|
|
||||||
|
if data.get("truncated"):
|
||||||
|
print("Warning: GitHub tree response is truncated; Material Symbols fallback will cover missing icons.")
|
||||||
|
|
||||||
|
index: dict[tuple[str, str], RepoIcon] = {}
|
||||||
|
for item in data.get("tree", []):
|
||||||
|
path = item.get("path")
|
||||||
|
if isinstance(path, str):
|
||||||
|
add_repo_icon(index, path)
|
||||||
|
return index
|
||||||
|
|
||||||
|
|
||||||
|
def add_repo_icon(index: dict[tuple[str, str], RepoIcon], path: str) -> None:
|
||||||
|
match = ANDROID_VECTOR_RE.match(path)
|
||||||
|
if not match:
|
||||||
|
return
|
||||||
|
_category, icon_snake, repo_style, filename = match.groups()
|
||||||
|
style = REPO_DIR_TO_STYLE.get(repo_style)
|
||||||
|
if style is None:
|
||||||
|
return
|
||||||
|
icon_name = snake_to_compose_name(icon_snake)
|
||||||
|
key = (style, icon_name)
|
||||||
|
current = index.get(key)
|
||||||
|
icon = IconRef(name=icon_name, style=style)
|
||||||
|
candidate = RepoIcon(icon=icon, path=path, source_name=icon_snake)
|
||||||
|
if current is None or rank_repo_path(path) < rank_repo_path(current.path):
|
||||||
|
index[key] = candidate
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_repo_icon(index: dict[tuple[str, str], RepoIcon], icon: IconRef) -> RepoIcon | None:
|
||||||
|
return index.get((icon.style, icon.name))
|
||||||
|
|
||||||
|
|
||||||
|
def material_symbol_icon(icon: IconRef) -> RepoIcon | None:
|
||||||
|
family = SYMBOLS_STYLE_TO_FAMILY.get(icon.style)
|
||||||
|
if family is None:
|
||||||
|
return None
|
||||||
|
source_name = compose_to_source_name(icon.name)
|
||||||
|
variant = "fill1" if icon.style == "filled" and not icon.name.endswith("Border") else "default"
|
||||||
|
path = f"symbols://{family}/{source_name}/{variant}/24px.svg"
|
||||||
|
return RepoIcon(icon=icon, path=path, source_name=source_name)
|
||||||
|
|
||||||
|
|
||||||
|
def rank_repo_path(path: str) -> tuple[int, int, str]:
|
||||||
|
drawable_rank = 0 if "/res/drawable/" in path else 1
|
||||||
|
filled_rank = 0 if "/materialicons/" in path else 1
|
||||||
|
return (drawable_rank, filled_rank, path)
|
||||||
|
|
||||||
|
|
||||||
|
def read_repo_icon_xml(path: str, local_repo: Path | None, cache_dir: Path) -> str:
|
||||||
|
if path.startswith("symbols://"):
|
||||||
|
return read_material_symbol_vector(path, cache_dir)
|
||||||
|
|
||||||
|
if local_repo:
|
||||||
|
repo_root = local_repo if local_repo.is_absolute() else Path.cwd() / local_repo
|
||||||
|
local_path = repo_root / Path(path)
|
||||||
|
if local_path.exists():
|
||||||
|
return local_path.read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
icon_cache = cache_dir / "xml"
|
||||||
|
icon_cache.mkdir(parents=True, exist_ok=True)
|
||||||
|
cached_path = icon_cache / path.replace("/", "__")
|
||||||
|
if cached_path.exists():
|
||||||
|
return cached_path.read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
url = RAW_BASE_URL + path
|
||||||
|
request = urllib.request.Request(url, headers={"User-Agent": "PhotonCamera-icon-importer"})
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(request, timeout=60) as response:
|
||||||
|
text = response.read().decode("utf-8")
|
||||||
|
except urllib.error.URLError as exc:
|
||||||
|
raise RuntimeError(f"Unable to download {url}: {exc}") from exc
|
||||||
|
cached_path.write_text(text, encoding="utf-8", newline="\n")
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
def read_material_symbol_vector(symbol_path: str, cache_dir: Path) -> str:
|
||||||
|
relative = symbol_path.removeprefix("symbols://")
|
||||||
|
symbol_cache = cache_dir / "symbols"
|
||||||
|
symbol_cache.mkdir(parents=True, exist_ok=True)
|
||||||
|
cached_svg = symbol_cache / relative.replace("/", "__")
|
||||||
|
if cached_svg.exists():
|
||||||
|
svg_text = cached_svg.read_text(encoding="utf-8")
|
||||||
|
else:
|
||||||
|
url = f"{SYMBOLS_BASE_URL}/{relative}"
|
||||||
|
request = urllib.request.Request(url, headers={"User-Agent": "PhotonCamera-icon-importer"})
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(request, timeout=60) as response:
|
||||||
|
svg_text = response.read().decode("utf-8")
|
||||||
|
except urllib.error.URLError as exc:
|
||||||
|
raise RuntimeError(f"Unable to download {url}: {exc}") from exc
|
||||||
|
cached_svg.write_text(svg_text, encoding="utf-8", newline="\n")
|
||||||
|
return svg_to_vector_xml(svg_text)
|
||||||
|
|
||||||
|
|
||||||
|
def svg_to_vector_xml(svg_text: str) -> str:
|
||||||
|
svg = ET.fromstring(svg_text)
|
||||||
|
view_box = svg.get("viewBox", "0 0 24 24").replace(",", " ").split()
|
||||||
|
if len(view_box) != 4:
|
||||||
|
raise ValueError(f"Unsupported SVG viewBox: {svg.get('viewBox')}")
|
||||||
|
min_x, min_y, width, height = [float(value) for value in view_box]
|
||||||
|
android = f"{{{ANDROID_NS}}}"
|
||||||
|
|
||||||
|
vector = ET.Element(
|
||||||
|
"vector",
|
||||||
|
{
|
||||||
|
android + "width": "24dp",
|
||||||
|
android + "height": "24dp",
|
||||||
|
android + "viewportWidth": format_number(width),
|
||||||
|
android + "viewportHeight": format_number(height),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
parent = vector
|
||||||
|
if min_x != 0 or min_y != 0:
|
||||||
|
group_attrs = {}
|
||||||
|
if min_x != 0:
|
||||||
|
group_attrs[android + "translateX"] = format_number(-min_x)
|
||||||
|
if min_y != 0:
|
||||||
|
group_attrs[android + "translateY"] = format_number(-min_y)
|
||||||
|
parent = ET.SubElement(vector, "group", group_attrs)
|
||||||
|
|
||||||
|
for svg_path in svg.findall(f".//{{{SVG_NS}}}path"):
|
||||||
|
path_data = svg_path.get("d")
|
||||||
|
if not path_data:
|
||||||
|
continue
|
||||||
|
attrs = {
|
||||||
|
android + "fillColor": "@android:color/black",
|
||||||
|
android + "pathData": path_data,
|
||||||
|
}
|
||||||
|
fill_rule = svg_path.get("fill-rule") or svg_path.get("clip-rule")
|
||||||
|
if fill_rule == "evenodd":
|
||||||
|
attrs[android + "fillType"] = "evenOdd"
|
||||||
|
ET.SubElement(parent, "path", attrs)
|
||||||
|
|
||||||
|
ET.indent(vector, space=" ")
|
||||||
|
return ET.tostring(vector, encoding="unicode") + "\n"
|
||||||
|
|
||||||
|
|
||||||
|
def normalize_vector_xml(xml_text: str, auto_mirrored: bool) -> str:
|
||||||
|
root = ET.fromstring(xml_text)
|
||||||
|
android = f"{{{ANDROID_NS}}}"
|
||||||
|
|
||||||
|
root.attrib.pop(android + "tint", None)
|
||||||
|
root.set(android + "width", root.get(android + "width", "24dp"))
|
||||||
|
root.set(android + "height", root.get(android + "height", "24dp"))
|
||||||
|
root.set(android + "viewportWidth", root.get(android + "viewportWidth", "24"))
|
||||||
|
root.set(android + "viewportHeight", root.get(android + "viewportHeight", "24"))
|
||||||
|
if auto_mirrored:
|
||||||
|
root.set(android + "autoMirrored", "true")
|
||||||
|
|
||||||
|
for path in root.iter():
|
||||||
|
if path.tag.endswith("path"):
|
||||||
|
path.set(android + "fillColor", "@android:color/black")
|
||||||
|
|
||||||
|
ET.indent(root, space=" ")
|
||||||
|
return ET.tostring(root, encoding="unicode") + "\n"
|
||||||
|
|
||||||
|
|
||||||
|
def drawable_resource_name(icon: IconRef, source_name: str) -> str:
|
||||||
|
parts = ["ic", "material"]
|
||||||
|
if icon.style != "filled":
|
||||||
|
parts.append(icon.style)
|
||||||
|
parts.append(source_name)
|
||||||
|
if icon.auto_mirrored:
|
||||||
|
parts.append("auto_mirrored")
|
||||||
|
parts.append("24")
|
||||||
|
return sanitize_resource_name("_".join(parts))
|
||||||
|
|
||||||
|
|
||||||
|
def sanitize_resource_name(name: str) -> str:
|
||||||
|
name = re.sub(r"[^a-z0-9_]", "_", name.lower())
|
||||||
|
name = re.sub(r"_+", "_", name).strip("_")
|
||||||
|
if not name or not name[0].isalpha():
|
||||||
|
name = "ic_" + name
|
||||||
|
return name
|
||||||
|
|
||||||
|
|
||||||
|
def snake_to_compose_name(value: str) -> str:
|
||||||
|
parts = value.split("_")
|
||||||
|
return "".join(part[:1].upper() + part[1:] for part in parts if part)
|
||||||
|
|
||||||
|
|
||||||
|
def compose_to_source_name(name: str) -> str:
|
||||||
|
if name in SPECIAL_COMPOSE_TO_SOURCE:
|
||||||
|
return SPECIAL_COMPOSE_TO_SOURCE[name]
|
||||||
|
value = re.sub(r"(?<=[a-z0-9])(?=[A-Z])", "_", name)
|
||||||
|
value = re.sub(r"(?<=[A-Z])(?=[A-Z][a-z])", "_", value)
|
||||||
|
return value.lower()
|
||||||
|
|
||||||
|
|
||||||
|
def format_number(value: float) -> str:
|
||||||
|
if value.is_integer():
|
||||||
|
return str(int(value))
|
||||||
|
return str(value)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -0,0 +1,410 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Rewrite Compose material-icons-extended usages to local ImageVector icons."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
from pathlib import Path
|
||||||
|
from xml.etree import ElementTree
|
||||||
|
|
||||||
|
|
||||||
|
ANDROID_NS = "{http://schemas.android.com/apk/res/android}"
|
||||||
|
SOURCE_ROOTS = (
|
||||||
|
Path("app/src/main/java"),
|
||||||
|
Path("app/src/default/java"),
|
||||||
|
)
|
||||||
|
MAPPING_PATH = Path("build/material_icons_importer/imported-icons.json")
|
||||||
|
OUTPUT_PATH = Path("app/src/main/java/com/hinnka/mycamera/ui/icons/AppIcons.kt")
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class IconMapping:
|
||||||
|
key: str
|
||||||
|
property_name: str
|
||||||
|
drawable_name: str
|
||||||
|
usage_patterns: tuple[str, ...]
|
||||||
|
import_patterns: tuple[str, ...]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class VectorPath:
|
||||||
|
path_data: str
|
||||||
|
fill_type: str = "NonZero"
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class VectorGroup:
|
||||||
|
name: str | None = None
|
||||||
|
rotate: float = 0.0
|
||||||
|
pivot_x: float = 0.0
|
||||||
|
pivot_y: float = 0.0
|
||||||
|
scale_x: float = 1.0
|
||||||
|
scale_y: float = 1.0
|
||||||
|
translation_x: float = 0.0
|
||||||
|
translation_y: float = 0.0
|
||||||
|
children: list[VectorGroup | VectorPath] = field(default_factory=list)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class VectorIcon:
|
||||||
|
property_name: str
|
||||||
|
default_width: float
|
||||||
|
default_height: float
|
||||||
|
viewport_width: float
|
||||||
|
viewport_height: float
|
||||||
|
auto_mirror: bool
|
||||||
|
children: list[VectorGroup | VectorPath]
|
||||||
|
|
||||||
|
|
||||||
|
def android_attr(element: ElementTree.Element, name: str) -> str | None:
|
||||||
|
return element.attrib.get(f"{ANDROID_NS}{name}")
|
||||||
|
|
||||||
|
|
||||||
|
def parse_float(value: str | None, default: float) -> float:
|
||||||
|
if not value:
|
||||||
|
return default
|
||||||
|
cleaned = value.strip().removesuffix("dp")
|
||||||
|
return float(cleaned)
|
||||||
|
|
||||||
|
|
||||||
|
def kt_float(value: float) -> str:
|
||||||
|
if value == int(value):
|
||||||
|
return f"{int(value)}f"
|
||||||
|
return f"{value:.4f}".rstrip("0").rstrip(".") + "f"
|
||||||
|
|
||||||
|
|
||||||
|
def kt_string(value: str) -> str:
|
||||||
|
return json.dumps(value, ensure_ascii=False)
|
||||||
|
|
||||||
|
|
||||||
|
def parse_fill_type(value: str | None) -> str:
|
||||||
|
if value == "evenOdd":
|
||||||
|
return "EvenOdd"
|
||||||
|
return "NonZero"
|
||||||
|
|
||||||
|
|
||||||
|
def element_tag_name(element: ElementTree.Element) -> str:
|
||||||
|
return element.tag.rsplit("}", 1)[-1]
|
||||||
|
|
||||||
|
|
||||||
|
def parse_vector_children(element: ElementTree.Element) -> list[VectorGroup | VectorPath]:
|
||||||
|
children: list[VectorGroup | VectorPath] = []
|
||||||
|
for child in element:
|
||||||
|
tag = element_tag_name(child)
|
||||||
|
if tag == "path":
|
||||||
|
path_data = android_attr(child, "pathData")
|
||||||
|
if not path_data:
|
||||||
|
continue
|
||||||
|
children.append(
|
||||||
|
VectorPath(
|
||||||
|
path_data=path_data,
|
||||||
|
fill_type=parse_fill_type(android_attr(child, "fillType")),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
elif tag == "group":
|
||||||
|
group = VectorGroup(
|
||||||
|
name=android_attr(child, "name"),
|
||||||
|
rotate=parse_float(android_attr(child, "rotation"), 0.0),
|
||||||
|
pivot_x=parse_float(android_attr(child, "pivotX"), 0.0),
|
||||||
|
pivot_y=parse_float(android_attr(child, "pivotY"), 0.0),
|
||||||
|
scale_x=parse_float(android_attr(child, "scaleX"), 1.0),
|
||||||
|
scale_y=parse_float(android_attr(child, "scaleY"), 1.0),
|
||||||
|
translation_x=parse_float(android_attr(child, "translateX"), 0.0),
|
||||||
|
translation_y=parse_float(android_attr(child, "translateY"), 0.0),
|
||||||
|
children=parse_vector_children(child),
|
||||||
|
)
|
||||||
|
children.append(group)
|
||||||
|
return children
|
||||||
|
|
||||||
|
|
||||||
|
def load_vector_icon(mapping: IconMapping, drawable_dir: Path) -> VectorIcon:
|
||||||
|
xml_path = drawable_dir / f"{mapping.drawable_name}.xml"
|
||||||
|
root = ElementTree.parse(xml_path).getroot()
|
||||||
|
return VectorIcon(
|
||||||
|
property_name=mapping.property_name,
|
||||||
|
default_width=parse_float(android_attr(root, "width"), 24.0),
|
||||||
|
default_height=parse_float(android_attr(root, "height"), 24.0),
|
||||||
|
viewport_width=parse_float(android_attr(root, "viewportWidth"), 24.0),
|
||||||
|
viewport_height=parse_float(android_attr(root, "viewportHeight"), 24.0),
|
||||||
|
auto_mirror=android_attr(root, "autoMirrored") == "true",
|
||||||
|
children=parse_vector_children(root),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def property_name_for_key(key: str) -> str:
|
||||||
|
parts = key.split(".")
|
||||||
|
if parts[0] == "filled":
|
||||||
|
return parts[1]
|
||||||
|
if parts[0] == "outlined":
|
||||||
|
return f"Outlined{parts[1]}"
|
||||||
|
if parts[0] == "AutoMirrored":
|
||||||
|
style = parts[1]
|
||||||
|
icon_name = parts[2]
|
||||||
|
if style == "filled":
|
||||||
|
return f"AutoMirrored{icon_name}"
|
||||||
|
return f"AutoMirrored{style.title()}{icon_name}"
|
||||||
|
return "".join(part.title() for part in parts)
|
||||||
|
|
||||||
|
|
||||||
|
def usage_patterns_for_key(key: str, property_name: str) -> tuple[str, ...]:
|
||||||
|
parts = key.split(".")
|
||||||
|
if parts[0] == "filled":
|
||||||
|
icon_name = parts[1]
|
||||||
|
return (f"Icons.Default.{icon_name}", f"Icons.Filled.{icon_name}")
|
||||||
|
if parts[0] == "outlined":
|
||||||
|
return (f"Icons.Outlined.{parts[1]}",)
|
||||||
|
if parts[:2] == ["AutoMirrored", "filled"]:
|
||||||
|
return (f"Icons.AutoMirrored.Filled.{parts[2]}",)
|
||||||
|
if parts[:2] == ["AutoMirrored", "outlined"]:
|
||||||
|
return (f"Icons.AutoMirrored.Outlined.{parts[2]}",)
|
||||||
|
return (key,)
|
||||||
|
|
||||||
|
|
||||||
|
def import_patterns_for_key(key: str) -> tuple[str, ...]:
|
||||||
|
parts = key.split(".")
|
||||||
|
if parts[0] == "filled":
|
||||||
|
return (f"import androidx.compose.material.icons.filled.{parts[1]}",)
|
||||||
|
if parts[0] == "outlined":
|
||||||
|
return (f"import androidx.compose.material.icons.outlined.{parts[1]}",)
|
||||||
|
if parts[:2] == ["AutoMirrored", "filled"]:
|
||||||
|
return (f"import androidx.compose.material.icons.automirrored.filled.{parts[2]}",)
|
||||||
|
if parts[:2] == ["AutoMirrored", "outlined"]:
|
||||||
|
return (f"import androidx.compose.material.icons.automirrored.outlined.{parts[2]}",)
|
||||||
|
return ()
|
||||||
|
|
||||||
|
|
||||||
|
def build_mappings(mapping_path: Path) -> list[IconMapping]:
|
||||||
|
data = json.loads(mapping_path.read_text(encoding="utf-8"))
|
||||||
|
mappings: list[IconMapping] = []
|
||||||
|
for key, drawable_ref in sorted(data.items()):
|
||||||
|
property_name = property_name_for_key(key)
|
||||||
|
drawable_name = drawable_ref.rsplit(".", 1)[-1]
|
||||||
|
mappings.append(
|
||||||
|
IconMapping(
|
||||||
|
key=key,
|
||||||
|
property_name=property_name,
|
||||||
|
drawable_name=drawable_name,
|
||||||
|
usage_patterns=usage_patterns_for_key(key, property_name),
|
||||||
|
import_patterns=import_patterns_for_key(key),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return mappings
|
||||||
|
|
||||||
|
|
||||||
|
def emit_path(path: VectorPath, indent: str) -> list[str]:
|
||||||
|
return [
|
||||||
|
f"{indent}addPath(",
|
||||||
|
f"{indent} pathData = addPathNodes({kt_string(path.path_data)}),",
|
||||||
|
f"{indent} fill = SolidColor(Color.Black),",
|
||||||
|
f"{indent} pathFillType = PathFillType.{path.fill_type},",
|
||||||
|
f"{indent})",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def emit_group(group: VectorGroup, indent: str) -> list[str]:
|
||||||
|
args: list[str] = []
|
||||||
|
if group.name:
|
||||||
|
args.append(f"name = {kt_string(group.name)}")
|
||||||
|
if group.rotate:
|
||||||
|
args.append(f"rotate = {kt_float(group.rotate)}")
|
||||||
|
if group.pivot_x:
|
||||||
|
args.append(f"pivotX = {kt_float(group.pivot_x)}")
|
||||||
|
if group.pivot_y:
|
||||||
|
args.append(f"pivotY = {kt_float(group.pivot_y)}")
|
||||||
|
if group.scale_x != 1.0:
|
||||||
|
args.append(f"scaleX = {kt_float(group.scale_x)}")
|
||||||
|
if group.scale_y != 1.0:
|
||||||
|
args.append(f"scaleY = {kt_float(group.scale_y)}")
|
||||||
|
if group.translation_x:
|
||||||
|
args.append(f"translationX = {kt_float(group.translation_x)}")
|
||||||
|
if group.translation_y:
|
||||||
|
args.append(f"translationY = {kt_float(group.translation_y)}")
|
||||||
|
|
||||||
|
if args:
|
||||||
|
lines = [f"{indent}group("]
|
||||||
|
lines.extend(f"{indent} {arg}," for arg in args)
|
||||||
|
lines.append(f"{indent}) {{")
|
||||||
|
else:
|
||||||
|
lines = [f"{indent}group {{"]
|
||||||
|
for child in group.children:
|
||||||
|
lines.extend(emit_vector_child(child, indent + " "))
|
||||||
|
lines.append(f"{indent}}}")
|
||||||
|
return lines
|
||||||
|
|
||||||
|
|
||||||
|
def emit_vector_child(child: VectorGroup | VectorPath, indent: str) -> list[str]:
|
||||||
|
if isinstance(child, VectorPath):
|
||||||
|
return emit_path(child, indent)
|
||||||
|
return emit_group(child, indent)
|
||||||
|
|
||||||
|
|
||||||
|
def cache_var_name(property_name: str) -> str:
|
||||||
|
return "_" + property_name[0].lower() + property_name[1:]
|
||||||
|
|
||||||
|
|
||||||
|
def emit_icon(icon: VectorIcon) -> list[str]:
|
||||||
|
cache_name = cache_var_name(icon.property_name)
|
||||||
|
lines = [
|
||||||
|
f" val {icon.property_name}: ImageVector",
|
||||||
|
" get() {",
|
||||||
|
f" {cache_name}?.let {{ return it }}",
|
||||||
|
" return ImageVector.Builder(",
|
||||||
|
f" name = {kt_string('AppIcons.' + icon.property_name)},",
|
||||||
|
f" defaultWidth = {kt_float(icon.default_width)}.dp,",
|
||||||
|
f" defaultHeight = {kt_float(icon.default_height)}.dp,",
|
||||||
|
f" viewportWidth = {kt_float(icon.viewport_width)},",
|
||||||
|
f" viewportHeight = {kt_float(icon.viewport_height)},",
|
||||||
|
f" autoMirror = {str(icon.auto_mirror).lower()},",
|
||||||
|
" ).apply {",
|
||||||
|
]
|
||||||
|
for child in icon.children:
|
||||||
|
lines.extend(emit_vector_child(child, " "))
|
||||||
|
lines.extend(
|
||||||
|
[
|
||||||
|
" }.build().also {",
|
||||||
|
f" {cache_name} = it",
|
||||||
|
" }",
|
||||||
|
" }",
|
||||||
|
"",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
return lines
|
||||||
|
|
||||||
|
|
||||||
|
def generate_app_icons(mappings: list[IconMapping], drawable_dir: Path) -> str:
|
||||||
|
icons = [load_vector_icon(mapping, drawable_dir) for mapping in mappings]
|
||||||
|
lines = [
|
||||||
|
"package com.hinnka.mycamera.ui.icons",
|
||||||
|
"",
|
||||||
|
"import androidx.compose.ui.graphics.Color",
|
||||||
|
"import androidx.compose.ui.graphics.PathFillType",
|
||||||
|
"import androidx.compose.ui.graphics.SolidColor",
|
||||||
|
"import androidx.compose.ui.graphics.vector.ImageVector",
|
||||||
|
"import androidx.compose.ui.graphics.vector.addPathNodes",
|
||||||
|
"import androidx.compose.ui.graphics.vector.group",
|
||||||
|
"import androidx.compose.ui.unit.dp",
|
||||||
|
"",
|
||||||
|
"object AppIcons {",
|
||||||
|
]
|
||||||
|
for icon in icons:
|
||||||
|
lines.extend(emit_icon(icon))
|
||||||
|
lines.append("}")
|
||||||
|
lines.append("")
|
||||||
|
for icon in icons:
|
||||||
|
lines.append(f"private var {cache_var_name(icon.property_name)}: ImageVector? = null")
|
||||||
|
lines.append("")
|
||||||
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
def kotlin_files(source_roots: tuple[Path, ...]) -> list[Path]:
|
||||||
|
files: list[Path] = []
|
||||||
|
for source_root in source_roots:
|
||||||
|
if source_root.exists():
|
||||||
|
files.extend(sorted(source_root.rglob("*.kt")))
|
||||||
|
return files
|
||||||
|
|
||||||
|
|
||||||
|
def remove_imports(text: str, import_patterns: set[str]) -> str:
|
||||||
|
lines = text.splitlines(keepends=True)
|
||||||
|
kept = []
|
||||||
|
for line in lines:
|
||||||
|
if line.strip() in import_patterns:
|
||||||
|
continue
|
||||||
|
kept.append(line)
|
||||||
|
return "".join(kept)
|
||||||
|
|
||||||
|
|
||||||
|
def ensure_app_icons_import(text: str) -> str:
|
||||||
|
app_icons_import = "import com.hinnka.mycamera.ui.icons.AppIcons"
|
||||||
|
if app_icons_import in text:
|
||||||
|
return text
|
||||||
|
|
||||||
|
lines = text.splitlines(keepends=True)
|
||||||
|
last_import = -1
|
||||||
|
for index, line in enumerate(lines):
|
||||||
|
if line.startswith("import "):
|
||||||
|
last_import = index
|
||||||
|
if last_import >= 0:
|
||||||
|
lines.insert(last_import + 1, app_icons_import + "\n")
|
||||||
|
return "".join(lines)
|
||||||
|
|
||||||
|
for index, line in enumerate(lines):
|
||||||
|
if line.startswith("package "):
|
||||||
|
insert_at = index + 1
|
||||||
|
if insert_at < len(lines) and lines[insert_at].strip() == "":
|
||||||
|
insert_at += 1
|
||||||
|
lines.insert(insert_at, app_icons_import + "\n")
|
||||||
|
return "".join(lines)
|
||||||
|
return app_icons_import + "\n\n" + text
|
||||||
|
|
||||||
|
|
||||||
|
def rewrite_kotlin_file(path: Path, mappings: list[IconMapping]) -> tuple[str, bool]:
|
||||||
|
original = path.read_text(encoding="utf-8")
|
||||||
|
import_patterns = {pattern for mapping in mappings for pattern in mapping.import_patterns}
|
||||||
|
text = remove_imports(original, import_patterns)
|
||||||
|
|
||||||
|
changed_usages = False
|
||||||
|
for mapping in mappings:
|
||||||
|
for usage in mapping.usage_patterns:
|
||||||
|
replacement = f"AppIcons.{mapping.property_name}"
|
||||||
|
if usage in text:
|
||||||
|
text = text.replace(usage, replacement)
|
||||||
|
changed_usages = True
|
||||||
|
|
||||||
|
if changed_usages:
|
||||||
|
text = ensure_app_icons_import(text)
|
||||||
|
|
||||||
|
return text, text != original
|
||||||
|
|
||||||
|
|
||||||
|
def rewrite_kotlin_files(mappings: list[IconMapping], source_roots: tuple[Path, ...], write: bool) -> list[Path]:
|
||||||
|
changed_paths: list[Path] = []
|
||||||
|
for path in kotlin_files(source_roots):
|
||||||
|
rewritten, changed = rewrite_kotlin_file(path, mappings)
|
||||||
|
if changed:
|
||||||
|
changed_paths.append(path)
|
||||||
|
if write:
|
||||||
|
path.write_text(rewritten, encoding="utf-8", newline="")
|
||||||
|
return changed_paths
|
||||||
|
|
||||||
|
|
||||||
|
def parse_args() -> argparse.Namespace:
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument("--mapping", type=Path, default=MAPPING_PATH)
|
||||||
|
parser.add_argument("--drawable-dir", type=Path, default=Path("app/src/main/res/drawable"))
|
||||||
|
parser.add_argument("--output", type=Path, default=OUTPUT_PATH)
|
||||||
|
parser.add_argument("--write", action="store_true")
|
||||||
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
args = parse_args()
|
||||||
|
mappings = build_mappings(args.mapping)
|
||||||
|
generated = generate_app_icons(mappings, args.drawable_dir)
|
||||||
|
|
||||||
|
changed_kotlin = rewrite_kotlin_files(mappings, SOURCE_ROOTS, write=args.write)
|
||||||
|
output_changed = not args.output.exists() or args.output.read_text(encoding="utf-8") != generated
|
||||||
|
|
||||||
|
print(f"icons: {len(mappings)}")
|
||||||
|
print(f"generated: {args.output}")
|
||||||
|
print(f"kotlin files to rewrite: {len(changed_kotlin)}")
|
||||||
|
for path in changed_kotlin:
|
||||||
|
print(f" {path}")
|
||||||
|
|
||||||
|
if args.write:
|
||||||
|
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
args.output.write_text(generated, encoding="utf-8", newline="\n")
|
||||||
|
print("wrote changes")
|
||||||
|
elif output_changed:
|
||||||
|
print("dry-run only; generated AppIcons.kt would change")
|
||||||
|
else:
|
||||||
|
print("dry-run only; generated AppIcons.kt is unchanged")
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
Reference in new issue
Block a user