new pig icon, some improvements
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ import androidx.lifecycle.lifecycleScope
|
||||
import com.arkivanov.decompose.retainedComponent
|
||||
import kotlinx.coroutines.launch
|
||||
import ru.shadowsparky.koin
|
||||
import ru.shadowsparky.vbox.shared.presentation.LocalColorSchemeProvider
|
||||
import ru.shadowsparky.ui.theme.LocalColorSchemeProvider
|
||||
import ru.shadowsparky.vbox.shared.presentation.Nav
|
||||
import ru.shadowsparky.vbox.shared.presentation.RootComponent
|
||||
import ru.shadowsparky.vbox.shared.presentation.RootFactory
|
||||
|
||||
-1
@@ -86,4 +86,3 @@ private val darkScheme = darkColorScheme(
|
||||
fun getPiggyColorScheme(): ColorScheme {
|
||||
return if (isSystemInDarkTheme()) darkScheme else lightScheme
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,95 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<group android:scaleX="0.506"
|
||||
android:scaleY="0.506"
|
||||
android:translateX="237.12"
|
||||
android:translateY="246.11555">
|
||||
android:viewportWidth="471"
|
||||
android:viewportHeight="458">
|
||||
<group android:scaleX="0.6670213"
|
||||
android:scaleY="0.64861095"
|
||||
android:translateX="78.41649"
|
||||
android:translateY="69.15344">
|
||||
<path
|
||||
android:pathData="M668.5,428.5Q680,417 680,400t-11.5,-28.5Q657,360 640,360t-28.5,11.5Q600,383 600,400t11.5,28.5Q623,440 640,440t28.5,-11.5ZM320,360h200v-80L320,280v80ZM180,840q-34,-114 -67,-227.5T80,380q0,-92 64,-156t156,-64h200q29,-38 70.5,-59t89.5,-21q25,0 42.5,17.5T720,140q0,6 -1.5,12t-3.5,11q-4,11 -7.5,22.5T702,209l91,91h87v279l-113,37 -67,224L480,840v-80h-80v80L180,840ZM240,760h80v-80h240v80h80l62,-206 98,-33v-141h-40L620,240q0,-20 2.5,-38.5T630,164q-29,8 -51,27.5T547,240L300,240q-58,0 -99,41t-41,99q0,98 27,191.5T240,760ZM480,462Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
android:pathData="M197.58,203.61C170.88,160.97 122.56,149.44 92.05,188.63C74.25,212.83 70.43,237.04 45,250.87C31.02,258.93 33.56,276.22 50.09,281.99C84.42,294.66 140.36,278.53 168.34,250.87C186.14,233.58 195.04,217.44 197.58,203.61Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="7"
|
||||
android:fillColor="#FFE1D8"
|
||||
android:strokeColor="#7C5A50"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M155.94,188.24C126.64,181.34 101.52,196.53 84.78,225.53C73.62,243.48 62.45,258.67 49.89,268.34C76.41,276.63 122.45,268.34 150.36,240.72C167.1,224.15 174.08,204.82 155.94,188.24Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="91.76"
|
||||
android:startY="174.43"
|
||||
android:endX="161.85"
|
||||
android:endY="291.08"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FFF8B3AD"/>
|
||||
<item android:offset="1" android:color="#FFF2A099"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M273.42,203.61C300.12,160.97 348.44,149.44 378.95,188.63C396.75,212.83 400.57,237.04 426,250.87C439.98,258.93 437.44,276.22 420.91,281.99C386.58,294.66 330.64,278.53 302.66,250.87C284.86,233.58 275.96,217.44 273.42,203.61Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="7"
|
||||
android:fillColor="#FFE1D8"
|
||||
android:strokeColor="#7C5A50"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M313.06,188.24C342.36,181.34 367.48,196.53 384.23,225.53C395.39,243.48 406.55,258.67 419.11,268.34C392.6,276.63 346.55,268.34 318.64,240.72C301.9,224.15 294.92,204.82 313.06,188.24Z"
|
||||
android:fillColor="#F2AAA3"/>
|
||||
<path
|
||||
android:pathData="M149.68,219.53C149.68,174.25 187.7,150.67 235.5,150.67C283.3,150.67 321.32,174.25 321.32,219.53V258.2C321.32,313.85 281.13,340.26 235.5,340.26C189.88,340.26 149.68,313.85 149.68,258.2V219.53Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="7"
|
||||
android:strokeColor="#7C5A50"
|
||||
android:strokeLineCap="round">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:centerX="235.5"
|
||||
android:centerY="210.09"
|
||||
android:gradientRadius="124.5"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FFFFEFE8"/>
|
||||
<item android:offset="1" android:color="#FFFFD8CE"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M197.96,203.74C203.68,203.74 208.32,199.23 208.32,193.67C208.32,188.11 203.68,183.6 197.96,183.6C192.24,183.6 187.6,188.11 187.6,193.67C187.6,199.23 192.24,203.74 197.96,203.74Z"
|
||||
android:fillColor="#5A4844"/>
|
||||
<path
|
||||
android:pathData="M270.8,203.74C276.52,203.74 281.16,199.23 281.16,193.67C281.16,188.11 276.52,183.6 270.8,183.6C265.08,183.6 260.45,188.11 260.45,193.67C260.45,199.23 265.08,203.74 270.8,203.74Z"
|
||||
android:fillColor="#5A4844"/>
|
||||
<path
|
||||
android:pathData="M237.5,318.3C278.28,318.3 311.34,292.62 311.34,260.93C311.34,229.24 278.28,203.56 237.5,203.56C196.71,203.56 163.65,229.24 163.65,260.93C163.65,292.62 196.71,318.3 237.5,318.3Z"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="5"
|
||||
android:strokeColor="#7C5A50"
|
||||
android:strokeLineCap="round">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:centerX="237.5"
|
||||
android:centerY="242.68"
|
||||
android:gradientRadius="88.67"
|
||||
android:type="radial">
|
||||
<item android:offset="0" android:color="#FFFFC4C1"/>
|
||||
<item android:offset="1" android:color="#FFF6A5A5"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M204.07,286.38C218.67,286.38 230.51,274.98 230.51,260.93C230.51,246.88 218.67,235.49 204.07,235.49C189.46,235.49 177.62,246.88 177.62,260.93C177.62,274.98 189.46,286.38 204.07,286.38Z"
|
||||
android:fillColor="#4E403D"/>
|
||||
<path
|
||||
android:pathData="M269.93,286.38C284.53,286.38 296.37,274.98 296.37,260.93C296.37,246.88 284.53,235.49 269.93,235.49C255.32,235.49 243.48,246.88 243.48,260.93C243.48,274.98 255.32,286.38 269.93,286.38Z"
|
||||
android:fillColor="#4E403D"/>
|
||||
<path
|
||||
android:pathData="M278.41,274.97C275.1,274.97 272.42,272.29 272.42,268.98V253.02C272.42,249.71 275.1,247.03 278.41,247.03C281.72,247.03 284.4,249.71 284.4,253.02V268.98C284.4,272.29 281.72,274.97 278.41,274.97ZM262.44,274.97C259.14,274.97 256.46,272.29 256.46,268.98V253.02C256.46,249.71 259.14,247.03 262.44,247.03C265.75,247.03 268.43,249.71 268.43,253.02V268.98C268.43,272.29 265.75,274.97 262.44,274.97ZM276.41,268.98C276.41,270.08 277.31,270.98 278.41,270.98C279.51,270.98 280.4,270.08 280.4,268.98V253.02C280.4,251.91 279.51,251.02 278.41,251.02C277.31,251.02 276.41,251.91 276.41,253.02V268.98ZM260.45,268.98C260.45,270.08 261.34,270.98 262.44,270.98C263.55,270.98 264.44,270.08 264.44,268.98V253.02C264.44,251.91 263.55,251.02 262.44,251.02C261.34,251.02 260.45,251.91 260.45,253.02V268.98Z"
|
||||
android:fillColor="#FFD9D0"/>
|
||||
<path
|
||||
android:pathData="M198.66,276.05C197.33,276.9 195.59,275.95 195.59,274.37V248.63C195.59,247.05 197.33,246.1 198.66,246.95L218.88,259.81C220.11,260.6 220.11,262.4 218.88,263.19L198.66,276.05ZM200.3,265.75C200.3,267.33 202.05,268.29 203.38,267.44L210.04,263.19C211.27,262.4 211.27,260.6 210.04,259.81L203.38,255.56C202.05,254.71 200.3,255.67 200.3,257.25V265.75Z"
|
||||
android:fillColor="#FFDAD0"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<group android:scaleX="0.506"
|
||||
android:scaleY="0.506"
|
||||
android:translateX="237.12"
|
||||
android:translateY="246.11555">
|
||||
<path
|
||||
android:pathData="M668.5,428.5Q680,417 680,400t-11.5,-28.5Q657,360 640,360t-28.5,11.5Q600,383 600,400t11.5,28.5Q623,440 640,440t28.5,-11.5ZM320,360h200v-80L320,280v80ZM180,840q-34,-114 -67,-227.5T80,380q0,-92 64,-156t156,-64h200q29,-38 70.5,-59t89.5,-21q25,0 42.5,17.5T720,140q0,6 -1.5,12t-3.5,11q-4,11 -7.5,22.5T702,209l91,91h87v279l-113,37 -67,224L480,840v-80h-80v80L180,840ZM240,760h80v-80h240v80h80l62,-206 98,-33v-141h-40L620,240q0,-20 2.5,-38.5T630,164q-29,8 -51,27.5T547,240L300,240q-58,0 -99,41t-41,99q0,98 27,191.5T240,760ZM480,462Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -2,5 +2,4 @@
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/pig_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/pig_launcher_foreground"/>
|
||||
<monochrome android:drawable="@drawable/pig_launcher_monochrome"/>
|
||||
</adaptive-icon>
|
||||
|
||||
+13
-10
@@ -115,17 +115,20 @@ class PlayerInteractor(
|
||||
}
|
||||
|
||||
private suspend fun saveTime(state: PlayerState) {
|
||||
with(cache) {
|
||||
movieId?.let {
|
||||
savedTimeRepository.setTime(
|
||||
SavedTimeInfo(
|
||||
movieId,
|
||||
seasonId,
|
||||
currentEpisodeIndex?.let { episodes?.getOrNull(it) }?.episode,
|
||||
state.currentPositionMs
|
||||
if (playMutex.isLocked) return
|
||||
playMutex.withLock {
|
||||
with(cache) {
|
||||
movieId?.let {
|
||||
savedTimeRepository.setTime(
|
||||
SavedTimeInfo(
|
||||
movieId,
|
||||
seasonId,
|
||||
currentEpisodeIndex?.let { episodes?.getOrNull(it) }?.episode,
|
||||
state.currentPositionMs
|
||||
)
|
||||
)
|
||||
)
|
||||
lastMillis = state.currentPositionMs
|
||||
lastMillis = state.currentPositionMs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-4
@@ -9,7 +9,6 @@ import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarScrollBehavior
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.seiko.imageloader.LocalImageLoader
|
||||
@@ -31,11 +30,9 @@ import ru.shadowsparky.vbox.shared.presentation.settings.register.RegisterScreen
|
||||
import ru.shadowsparky.vbox.shared.presentation.settings.serv.EditServScreen
|
||||
import ru.shadowsparky.vbox.shared.presentation.settings.tag.TagScreen
|
||||
|
||||
val LocalColorSchemeProvider = compositionLocalOf<ColorScheme?> { null }
|
||||
|
||||
@Composable
|
||||
fun getColorScheme(): ColorScheme {
|
||||
return LocalColorSchemeProvider.current ?: ru.shadowsparky.ui.theme.getColorScheme()
|
||||
return ru.shadowsparky.ui.theme.getColorScheme()
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
@@ -2,11 +2,10 @@ package ru.shadowsparky.ui.theme
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material3.ColorScheme
|
||||
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
||||
import androidx.compose.material3.MaterialExpressiveTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
|
||||
val lightScheme = lightColorScheme(
|
||||
primary = primaryLight,
|
||||
@@ -84,21 +83,11 @@ val darkScheme = darkColorScheme(
|
||||
surfaceContainerHighest = surfaceContainerHighestDark,
|
||||
)
|
||||
|
||||
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||
@Composable
|
||||
fun AppTheme(
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
MaterialExpressiveTheme(
|
||||
colorScheme = getColorScheme(),
|
||||
typography = AppTypography,
|
||||
content = content
|
||||
)
|
||||
}
|
||||
val LocalColorSchemeProvider = compositionLocalOf<ColorScheme?> { null }
|
||||
|
||||
@Composable
|
||||
fun getColorScheme(): ColorScheme {
|
||||
return when {
|
||||
return LocalColorSchemeProvider.current ?: when {
|
||||
isSystemInDarkTheme() -> darkDynamicScheme() ?: darkScheme
|
||||
else -> lightDynamicScheme() ?: lightScheme
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user