Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.
Kotlin alternativeandroidandroid-applicationclientglassmorphisminnertubelibrespotliquid-glassspotifyspotify-connectspotifyapiyoutube-musicyoutube-playerytdlnis
Contract the player as it collapses
Lelonio298e6c22b2d1
diff --git a/.claude/settings.local.json b/.claude/settings.local.jsonindex d010275..915f24c 100644--- a/.claude/settings.local.json+++ b/.claude/settings.local.json@@ -90,7 +90,8 @@"Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Reorder the home sections *)","Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Raise the volume of a track created after playback started *)","Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Cross-fade the player'\\\\''s middle slot *)",- "Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Let the page show through the player as it is dragged away *)"+ "Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Let the page show through the player as it is dragged away *)",+ "Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Contract the player as it collapses *)"]}}diff --git a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.binindex 3de6e85..25a1f87 100644--- a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin+++ b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin@@ -2,27 +2,27 @@ C/C++ Structured Logljh/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/additional_project_files.txtCA-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint �����3 ����3i+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint �����3 ����3ig-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json �����3� ����3n+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json �����3� ����3nl-j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json �����3� �����3[+j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json �����3� �����3[Y-W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja �����3�� ����3_+W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja �����3�� ����3_]-[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt �����3d+[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt �����3db-`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt �����3 @ ����3e+`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt �����3 @ ����3ec-a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json �����3�� ����3i+a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json �����3�� ����3ig-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin �����3 �" ����3o+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin �����3 �" ����3om-k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt �����3+k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt �����3� ����3b`-^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json �����3 ( ����3g+^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json �����3 ( ����3ge-c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt �����3 b ����3D+c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt �����3 b ����3DB-@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt �����3 � �Ȅ��3\ No newline at end of file+@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt �����3 � �Ȅ��3\ No newline at end of filediff --git a/app/src/main/java/dev/emanuele/spot/ui/player/NowPlayingSheet.kt b/app/src/main/java/dev/emanuele/spot/ui/player/NowPlayingSheet.ktindex 46cb02a..7ad5b3f 100644--- a/app/src/main/java/dev/emanuele/spot/ui/player/NowPlayingSheet.kt+++ b/app/src/main/java/dev/emanuele/spot/ui/player/NowPlayingSheet.kt@@ -22,6 +22,7 @@ import androidx.compose.runtime.rememberCoroutineScopeimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.graphics.CompositingStrategy+import androidx.compose.ui.graphics.TransformOriginimport androidx.compose.ui.graphics.graphicsLayerimport androidx.compose.ui.layout.layoutimport androidx.compose.ui.platform.LocalDensity@@ -196,7 +197,21 @@ fun NowPlayingSheet(.height(fullHeight).fillMaxWidth().graphicsLayer {- alpha = expandedAlpha(progress.value)+ val f = progress.value.coerceIn(0f, 1f)+ alpha = expandedAlpha(f)+ // Contracts towards the bottom edge as it closes.+ //+ // Without this the player was a full-size screen+ // being slid down behind a shrinking window: every+ // element kept its size right up to the moment it+ // was gone, which reads as a screen leaving rather+ // than as a panel collapsing into the bar. The+ // origin is the bottom because that is where the bar+ // it is becoming actually is.+ val scale = COLLAPSE_SCALE + (1f - COLLAPSE_SCALE) * f+ scaleX = scale+ scaleY = scale+ transformOrigin = TransformOrigin(0.5f, 1f)// Modulated rather than composited: the default// draws the whole subtree into an offscreen buffer// the size of the window before applying alpha,@@ -242,6 +257,14 @@ private fun collapsedAlpha(fraction: Float): Float =private fun expandedAlpha(fraction: Float): Float =((fraction - 0.15f) / 0.5f).coerceIn(0f, 1f)+/**+ * How far the player is shrunk when fully collapsed.+ *+ * Enough to read as a contraction; much below this and the text inside starts+ * to look like it is being squashed rather than moving away.+ */+private const val COLLAPSE_SCALE = 0.86f+/** Margin the collapsed bar keeps from the edges of the window. */private val SIDE_MARGIN = 16.dp