feat(android): use Material Outlined LibraryMusic for top-nav Library
android / Build + lint + test (push) Failing after 2m34s
android / Build + lint + test (push) Failing after 2m34s
Lucide has no music-library glyph — Library / LibraryBig / SquareLibrary all read as a generic books-on-shelf icon without a label. Operator picked Material's LibraryMusic (the canonical "books + music note" symbol used by every major music app) as the recognizable alternative. Use the Outlined variant: filled icons would clash with the neighbouring stroked Lucide icons (House, Search, EllipsisVertical), but Outlined's stroke style matches Lucide closely enough that the mix is subtle. Adds the compose-material-icons-extended dependency (version pinned by compose-bom). R8 strips unused icons in release builds so the APK cost is just the ones we actually reference.
This commit is contained in:
@@ -139,6 +139,7 @@ dependencies {
|
||||
implementation(libs.compose.ui)
|
||||
implementation(libs.compose.ui.graphics)
|
||||
implementation(libs.compose.material3)
|
||||
implementation(libs.compose.material.icons.extended)
|
||||
implementation(libs.compose.ui.text.google.fonts)
|
||||
debugImplementation(libs.compose.ui.tooling)
|
||||
implementation(libs.compose.ui.tooling.preview)
|
||||
|
||||
+10
-2
@@ -11,12 +11,13 @@ import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.LibraryMusic
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import androidx.navigation.NavHostController
|
||||
import com.composables.icons.lucide.House
|
||||
import com.composables.icons.lucide.Lucide
|
||||
import com.composables.icons.lucide.SquareLibrary
|
||||
import com.composables.icons.lucide.EllipsisVertical
|
||||
import com.composables.icons.lucide.Search as SearchIcon
|
||||
import com.fabledsword.minstrel.nav.Admin
|
||||
@@ -58,7 +59,14 @@ fun MainAppBarActions(
|
||||
}
|
||||
if (currentRouteName != Library::class.qualifiedName) {
|
||||
IconButton(onClick = { navController.navigate(Library) }) {
|
||||
Icon(Lucide.SquareLibrary, contentDescription = "Library")
|
||||
// Intentional cross-family icon — Lucide has no
|
||||
// equivalent "library + music" glyph and the literal
|
||||
// library icons (Library / LibraryBig / SquareLibrary)
|
||||
// don't read as "music collection" without a label.
|
||||
// Material's Outlined LibraryMusic is the canonical
|
||||
// music-library symbol; the outlined variant matches
|
||||
// Lucide's stroke style closely enough to blend.
|
||||
Icon(Icons.Outlined.LibraryMusic, contentDescription = "Library")
|
||||
}
|
||||
}
|
||||
if (currentRouteName != SearchRoute::class.qualifiedName) {
|
||||
|
||||
@@ -51,6 +51,11 @@ compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
|
||||
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
|
||||
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
|
||||
compose-material3 = { module = "androidx.compose.material3:material3" }
|
||||
# material-icons-extended supplies the full Material Icons catalog
|
||||
# (Outlined / Filled / Rounded / Sharp / TwoTone). We use the Outlined
|
||||
# variant for LibraryMusic — its stroke style blends with Lucide.
|
||||
# Version pinned by compose-bom.
|
||||
compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
|
||||
compose-ui-text-google-fonts = { module = "androidx.compose.ui:ui-text-google-fonts" }
|
||||
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
|
||||
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" }
|
||||
|
||||
Reference in New Issue
Block a user