Skip to content

Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.

Blur the rows under the sort menu, and let the tabs be tapped off-tab

Lelonio5691dab8b99f
diff --git a/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin b/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin
index 3782ae7..bf9262b 100644
--- a/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin
+++ b/app/.cxx/Debug/286k5v33/arm64-v8a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Logc
a
_/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ��݋�3  ��߈�3`
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ߼��3  ��߈�3`
^
-\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build.json  ��݋�3� ��߈�3e
+\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build.json  ߼��3� ��߈�3e
c
-a/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build_mini.json  ��݋�3� ��߈�3R
+a/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/android_gradle_build_mini.json  ߼��3� ��߈�3R
P
-N/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja  ��݋�3� ��߈�3V
+N/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja  ���3� ��߈�3V
T
-R/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja.txt  ��݋�3[
+R/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build.ninja.txt  ���3[
Y
-W/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build_file_index.txt  ��݋�3 @ ��߈�3\
+W/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/build_file_index.txt  ���3 @ ��߈�3\
Z
-X/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json  ��݋�3֚ ��߈�3`
+X/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json  ���3֚ ��߈�3`
^
-\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json.bin  ��݋�3 �" ��߈�3f
+\/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/compile_commands.json.bin  ���3 �" ��߈�3f
d
-b/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/metadata_generation_command.txt  ��݋�3
+b/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/metadata_generation_command.txt  ���3
� ��߈�3Y
W
-U/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/prefab_config.json  ��݋�3  ( ��߈�3^
+U/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/prefab_config.json  ���3  ( ��߈�3^
\
-Z/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/symbol_folder_index.txt  ��݋�3  Y ��߈�3D
+Z/Users/emanuele/Progetto Spotify/app/.cxx/Debug/286k5v33/arm64-v8a/symbol_folder_index.txt  ���3  Y ��߈�3D
B
-@/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 file
diff --git a/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt b/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
index 35d5ede..e2463df 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/SpotApp.kt
@@ -770,16 +770,17 @@ private fun BottomBar(
verticalAlignment = Alignment.CenterVertically,
) {
Box(Modifier.weight(1f)) {
- // While the search screen is open, taps on the tabs have to be
- // caught here rather than by the bar.
+ // On any screen that is not one of the tabs, taps on them have to
+ // be caught here rather than by the bar.
//
// The bar draws its sliding indicator *over* the selected tab, and
// that indicator carries the drag gesture, so it swallows taps on
- // whatever it is sitting on. Search is not one of the tabs, so the
- // selection falls back to Home — and tapping Home then hit the
- // indicator, matched the index the bar already held, and produced no
- // event at all. That was the "search does not close" bug.
- if (route == Routes.SEARCH) {
+ // whatever it is sitting on. Off the tabs the selection falls back
+ // to the last one used — so tapping it hit the indicator, matched
+ // the index the bar already held, and produced no event at all.
+ // That was search not closing, and a playlist or the settings not
+ // going back to the page the tab stands for.
+ if (routeIndex < 0) {
Row(Modifier.matchParentSize().zIndex(1f)) {
routes.forEach { tab ->
Box(
diff --git a/app/src/main/java/dev/emanuele/spot/ui/components/GlassMenu.kt b/app/src/main/java/dev/emanuele/spot/ui/components/GlassMenu.kt
index 2569b2a..97dc47c 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/components/GlassMenu.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/components/GlassMenu.kt
@@ -280,8 +280,12 @@ fun BoxScope.GlassChoiceMenu(
GlassSurface(
backdrop = backdrop,
shape = shape,
- surfaceColor = CapsuleFilm,
- blurRadius = 20.dp,
+ // Dark, unlike the other glass in the app. This is the one pane
+ // that opens over a list of white titles, and a light film left
+ // them showing through its own labels — legibility beats keeping
+ // every surface the same film.
+ surfaceColor = ChoiceFilm,
+ blurRadius = 30.dp,
modifier = Modifier
.width(CHOICE_MENU_WIDTH)
.clip(shape)
@@ -325,6 +329,9 @@ fun GlassChoiceItem(
}
}
+/** Dark enough that a track title behind it never competes with a label. */
+private val ChoiceFilm = Color(0xFF121216).copy(alpha = 0.72f)
+
/** Narrow on purpose; the longest label still fits on one line. */
val CHOICE_MENU_WIDTH = 196.dp
diff --git a/app/src/main/java/dev/emanuele/spot/ui/library/PlaylistScreen.kt b/app/src/main/java/dev/emanuele/spot/ui/library/PlaylistScreen.kt
index caf8275..84d9023 100644
--- a/app/src/main/java/dev/emanuele/spot/ui/library/PlaylistScreen.kt
+++ b/app/src/main/java/dev/emanuele/spot/ui/library/PlaylistScreen.kt
@@ -67,6 +67,7 @@ import dev.emanuele.spot.data.CatalogTrack
import dev.emanuele.spot.ui.MainViewModel
import com.kyant.backdrop.Backdrop
import com.kyant.backdrop.backdrops.layerBackdrop
+import com.kyant.backdrop.backdrops.rememberCombinedBackdrop
import com.kyant.backdrop.backdrops.rememberLayerBackdrop
import dev.emanuele.spot.ui.components.Artwork
import dev.emanuele.spot.ui.components.CHOICE_MENU_WIDTH
@@ -163,6 +164,9 @@ fun PlaylistScreen(
// cover.
val pageBackdrop = rememberLayerBackdrop()
+ /** The rows, for the one piece of glass that opens over them. */
+ val listBackdrop = rememberLayerBackdrop()
+
var sortAnchor by remember { mutableStateOf(IntOffset.Zero) }
val density = LocalDensity.current
@@ -272,7 +276,14 @@ fun PlaylistScreen(
LazyColumn(
state = listState,
- modifier = Modifier.nestedScroll(headerScroll),
+ // Recorded so the sort menu has something to blur. It opens over
+ // the rows, and the page layer holds only the cover and the page
+ // colour — over a flat fill, glass has nothing to bend and comes
+ // out as a grey card. Safe to record: the menu is drawn outside the
+ // list, so nothing in this layer samples it.
+ modifier = Modifier
+ .layerBackdrop(listBackdrop)
+ .nestedScroll(headerScroll),
contentPadding = PaddingValues(bottom = contentPadding.calculateBottomPadding()),
) {
if (state.albums.isNotEmpty()) {
@@ -434,7 +445,7 @@ fun PlaylistScreen(
GlassChoiceMenu(
visible = sortOpen,
anchor = sortAnchor.leftOf(density),
- backdrop = pageBackdrop,
+ backdrop = rememberCombinedBackdrop(pageBackdrop, listBackdrop),
onDismiss = { sortOpen = false },
) {
TrackSort.entries.forEach { option ->