Merged
Conversation
…mic theme generation
- **Theming & Color Generation**:
- Overhauls the color extraction engine to use `QuantizerCelebi` and `DynamicScheme` for more accurate and Material 3-compliant color palettes.
- Introduces `AlbumArtPaletteStyle` to allow users to choose between different tonal recipes: Tonal Spot, Vibrant, Expressive, Fruit Salad, and Monochrome.
- Implements sophisticated color scoring logic in `ColorRoles.kt` to handle neutral/monochrome artwork better and prevent over-saturation.
- Expands the set of persisted color roles to include fixed colors and various surface container levels (e.g., `surfaceBright`, `surfaceContainerHigh`, `primaryFixed`).
- **Settings & UI**:
- Adds a new "Album Art Palette Style" selector in the Theme settings category.
- Updates `SettingsViewModel` and `UserPreferencesRepository` to manage the lifecycle and persistence of the selected palette style.
- **Data & Persistence**:
- Migrates `PixelPlayDatabase` to version 15, adding new columns to `album_art_themes` for the additional color roles and `paletteStyle` cache key.
- Updates `AlbumArtThemeDao` and `ColorSchemeProcessor` to support caching and retrieving color schemes based on both the image URI and the selected palette style.
- **Performance**:
- Refines the `ColorSchemeProcessor` and `ThemeStateHolder` to handle dynamic style changes, ensuring UI components refresh their color schemes when the palette preference is updated.
- Optimizes image downscaling for color extraction to improve processing speed.
Refine Full Player UI, album palette management, and component styling
- **Settings & Theme Management**:
- Adds "Force Album Palette Regeneration" in Developer settings, allowing users to select a song and rebuild all its cached color variants from scratch.
- Implements `PaletteRegenerateSongSheetContent` with a searchable song list and progress indicator for palette rebuilding.
- Updates `ThemeStateHolder` and `ColorSchemeProcessor` to support full style invalidation and clearing of the extracted color cache.
- **Full Player & Playback UI**:
- Overhauls the color palette in `FullPlayerContent` to use semantic colors (e.g., `onPrimaryContainer`, `secondaryContainer`) for better contrast and visual consistency.
- Updates `AnimatedPlaybackControls` to support independent color/tint customization for previous, play/pause, and next buttons.
- Improves visibility of the "Cast" connection state by removing fixed alpha overlays on album art.
- Refines playback control chips and secondary action rows (shuffle, repeat, favorite) with updated container colors and corner smoothing.
- **Component Styling & Theming**:
- Wraps `QueueBottomSheet` and `LyricsMoreBottomSheet` in localized `MaterialTheme` providers to ensure they inherit the active album-based color scheme.
- Replaces manual alpha backgrounds with `graphicsLayer` alpha on the playback queue scrim for better performance.
- Updates button backgrounds in the compact player to use `onPrimary` for improved clarity against dynamic backgrounds.
- **Refactoring**:
- Adds `forceRegenerateAlbumPaletteForSong` to `PlayerViewModel` to bridge the UI and theme processing logic.
- Cleans up unused imports and unused variables across player components.
- **Theming & Color Logic**:
- Improves `GenreThemeUtils` by introducing an `LruCache` for `ColorScheme` instances to optimize performance.
- Refactors `getGenreThemeColor` and `getGenreColorScheme` to support explicit hex color overrides (dark/light) from `Genre` models.
- Adds logic to derive consistent secondary and tertiary colors using seed-based scheme generation.
- Implements fallback mechanisms for seed color resolution based on genre IDs.
- **Genre Detail Screen**:
- Integrates the updated dynamic theming to ensure the entire screen (including status bar and components) reflects genre-specific colors.
- Optimizes `GenreDetailScreen` by resolving the genre from the library state to ensure metadata consistency.
- Refines typography and layout, removing unnecessary `CompositionLocalProvider` wrappers and simplifying color references.
- Ensures proper "Shuffle" labels and display names are used when playing music from the genre view.
- **Data & Repositories**:
- Updates `MusicRepositoryImpl` to sanitize genre IDs by replacing slashes with underscores, preventing navigation and lookup issues.
- **UI Components**:
- Updates `GenreCategoriesGrid` to utilize the enhanced `getGenreThemeColor` signature for more accurate grid item coloring.
- **Dynamic Theming**:
- Introduces `albumColorScheme` which reactively updates the screen's color palette based on the current album art.
- Integrates `getAlbumColorSchemeFlow` from `playerViewModel` to fetch and collect theme states for specific album URIs.
- Wraps the screen content in a localized `MaterialTheme` provider to apply the album-specific colors (supporting both light and dark modes).
- **UI Structure**:
- Refactors `AlbumDetailScreen` layout to accommodate the new theme provider.
- Maintains existing state management for loading indicators, error handling, and the collapsing top bar within the new theme context.
- **State Management**:
- Updates `AlbumDetailScreen` to use `remember` and `collectAsState` for efficiently handling color scheme transitions when the album changes.
- **UI Consistency**:
- Wraps the `SongInfoBottomSheet` in `UnifiedPlayerSheet` and `GenreDetailScreen` with a `MaterialTheme` that uses the context-specific color scheme (`albumColorScheme` and `genreColorScheme` respectively).
- This ensures that the bottom sheet's UI components (buttons, text, background) correctly inherit the dynamic colors derived from the album art or genre, providing a more cohesive and visually integrated user experience.
…player components
- **Settings & Navigation**:
- Replaces the `Album Art Palette Style` inline selector in `SettingsCategoryScreen` with a dedicated `SettingsItem` that navigates to a new `PaletteStyleSettingsScreen`.
- Registers the `PaletteStyle` route in `AppNavigation` with standard transitions.
- Adds `PaletteStyle` to the list of routes that hide the navigation bar in `MainActivity`.
- **Theme & UI Consistency**:
- Wraps `CastBottomSheet` in `UnifiedPlayerSheet` with a explicit `MaterialTheme` block to ensure `LocalMaterialTheme` colors are correctly applied to the component and its children.
- Wraps `FetchLyricsDialog` in both `LyricsSheet` and `FullPlayerContent` with `MaterialTheme` to ensure consistent styling and color scheme application when displayed over player content.
- **Components**:
- Introduces `PaletteStyleSettingsScreen` to provide a live preview and specialized interface for choosing tonal recipes for album-art themes.
…ayer sheet's visual transitions and theme integration.
- **Palette Style Settings**:
- Introduces `PaletteStyleSettingsScreen`, allowing users to choose between different color schemes (Tonal Spot, Vibrant, Expressive, Fruit Salad, Monochrome) for the player UI based on album art.
- Features a high-fidelity "Skeleton Preview" of the player UI that dynamically updates to reflect selected palette styles.
- Includes a description for each palette style to guide user choice.
- **Unified Player Sheet**:
- Implements a scale-in and fade-in animation (`miniAppearProgress`) for the player area when album art color schemes are loading.
- Refines the "bounce" collapse animation logic to only trigger when explicitly collapsing from an expanded state.
- Improves theme handling by conditionally applying the album art color scheme or system scheme based on the `playerThemePreference`.
- Updates shadow and elevation logic to smoothly interpolate during expansion and theme transitions.
- **Player & ViewModels**:
- Exposes `playerThemePreference` in `PlayerViewModel` to allow components to react to theme setting changes.
- Updates `UnifiedPlayerSheet` to use `CompositionLocalProvider` for more stable theme propagation across mini and full player transitions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New album art color engine