feat(desktop): add jmtc windows

Signed-off-by: maxrave-dev <ndtminh2608@gmail.com>
This commit is contained in:
maxrave-dev 2026-07-18 02:13:00 +07:00
parent c4353a8985
commit 793dda6724
No known key found for this signature in database
5 changed files with 17 additions and 10 deletions

View file

@ -36,6 +36,7 @@ import com.maxrave.simpmusic.viewModel.UIEvent
fun PlayerControlLayout(
controllerState: ControlState,
isSmallSize: Boolean = false,
contentColor: Color = Color.White,
onUIEvent: (UIEvent) -> Unit,
) {
val height = if (isSmallSize) 48.dp else 96.dp
@ -70,7 +71,7 @@ fun PlayerControlLayout(
if (!isShuffle) {
Icon(
imageVector = Icons.Rounded.Shuffle,
tint = Color.White,
tint = contentColor,
contentDescription = "",
modifier = Modifier.size(smallIcon.first),
)
@ -104,7 +105,7 @@ fun PlayerControlLayout(
) {
Icon(
imageVector = Icons.Rounded.SkipPrevious,
tint = if (controllerState.isPreviousAvailable) Color.White else Color.Gray,
tint = if (controllerState.isPreviousAvailable) contentColor else contentColor.copy(alpha = 0.4f),
contentDescription = "",
modifier = Modifier.size(mediumIcon.first),
)
@ -129,14 +130,14 @@ fun PlayerControlLayout(
if (!isPlaying) {
Icon(
imageVector = Icons.Rounded.PlayCircle,
tint = Color.White,
tint = contentColor,
contentDescription = "",
modifier = Modifier.size(bigIcon.first),
)
} else {
Icon(
imageVector = Icons.Rounded.PauseCircle,
tint = Color.White,
tint = contentColor,
contentDescription = "",
modifier = Modifier.size(bigIcon.first),
)
@ -163,7 +164,7 @@ fun PlayerControlLayout(
) {
Icon(
imageVector = Icons.Rounded.SkipNext,
tint = if (controllerState.isNextAvailable) Color.White else Color.Gray,
tint = if (controllerState.isNextAvailable) contentColor else contentColor.copy(alpha = 0.4f),
contentDescription = "",
modifier = Modifier.size(mediumIcon.first),
)
@ -188,7 +189,7 @@ fun PlayerControlLayout(
is RepeatState.None -> {
Icon(
imageVector = Icons.Rounded.Repeat,
tint = Color.White,
tint = contentColor,
contentDescription = "",
modifier = Modifier.size(smallIcon.first),
)

View file

@ -55,6 +55,7 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.LocalMinimumInteractiveComponentSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProgressIndicatorDefaults
import androidx.compose.material3.Slider
import androidx.compose.material3.SliderDefaults
@ -556,6 +557,9 @@ fun MiniPlayer(
}
}
} else {
// Desktop bottom bar surface follows the theme (haze over content), so text and controls
// use the theme foreground token instead of the artwork-luminance colour.
val textColor = MaterialTheme.colorScheme.onBackground
var isSliding by rememberSaveable {
mutableStateOf(false)
}
@ -669,6 +673,7 @@ fun MiniPlayer(
PlayerControlLayout(
controllerState,
isSmallSize = true,
contentColor = textColor,
) {
sharedViewModel.onUIEvent(it)
}

2
core

@ -1 +1 @@
Subproject commit b920f2c8393e7d787abab3ef40bc983b074a347b
Subproject commit 63c9b8bdefe2b97758c5f62b253a49875613dae0

View file

@ -26,4 +26,5 @@ android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.usesSdkInManifest.disallowed=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.r8.optimizedResourceShrinking=false
isFullBuild=true

View file

@ -222,8 +222,8 @@ native-tray = { module = "io.github.kdroidfilter:composenativetray", version.ref
vlcj = { module = "uk.co.caprica:vlcj", version.ref = "vlcj" }
jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
jna-platform = { module = "net.java.dev.jna:jna-platform", version.ref = "jnaPlatform" }
nowplaying = { module = "org.simpmusic:nowplayingcenter", version = "0.0.1" }
jmtc = { module = "org.simpmusic:jmtc", version = "0.0.1" }
nowplaying = { module = "org.simpmusic:nowplayingcenter", version = "0.0.2" }
jmtc = { module = "org.simpmusic:jmtc", version = "0.0.2" }
#Koin
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin-bom" }