Skip to content

Comments

feat: Introduce new widget styles with dynamic theming#1155

Open
adlifarizi wants to merge 4 commits intotheovilardo:masterfrom
adlifarizi:impl/widget-styles
Open

feat: Introduce new widget styles with dynamic theming#1155
adlifarizi wants to merge 4 commits intotheovilardo:masterfrom
adlifarizi:impl/widget-styles

Conversation

@adlifarizi
Copy link
Contributor

Description

This PR introduces three new glance widget styles (BarWidget4x1, ControlWidget4x2, GridWidget2x2) to improve the home screen experience. It also includes support for dynamic themes, which follow the user's Player Theme preferences using system dynamic or album art, as well as following the pallete style album art preferences.

Note

I deleted the old widget from the receiver manifest so that the old widget did not appear in the picker widget, but I did not delete all files related to the old widget if needed in the future or as a reference

Because this is related to M3E design, maybe I need your approval/feedback. Here are some screenshots for the review

Widget Picker Preview

image

**Widget Homescreen Preview **

*This screenshot is in system dark theme, I forgot to include light theme, but the color follow actual full player theme
image
image

Introduces three new home screen widgets for player control:
- A compact 4x1 "Bar" widget.
- A 4x2 "Control" widget with extended controls (shuffle, repeat).
- A 2x2 "Grid" widget with a minimal, album-art-focused layout.
…olor mapping

- Changed theme fields in `PlayerInfo` for more specific control over widget element colors (surface container, title, artist, and playback controls).
- Enhance `MusicService` to support Android 12+ dynamic color schemes based on user preferences.
- Refactor `BarWidget4x1`, `ControlWidget4x2`, and `GridWidget2x2` to use the new specific color providers for improved visual consistency.
- Extracts common widget UI elements into `WidgetComponents.kt` and `WidgetUtils.kt`, including shared logic for album art caching and dynamic color providing.
- Implements dedicated XML layouts and vector drawables for high-fidelity widget previews in the system widget picker.
- Updates `BarWidget4x1`, `ControlWidget4x2`, and `GridWidget2x2` to use the new shared components and color mapping.
- Removes the old `PixelPlayGlanceWidgetReceiver` from the manifest.
- Updates `PreviousButton`, `NextButton`, and `PlayPauseButton` in `WidgetComponents.kt` to accept an `iconSize` parameter.
- Implements dynamic sizing for icons and album art in `GridWidget2x2.kt` based on the available widget dimensions.
@theovilardo
Copy link
Owner

Hi! This is actually pretty impressive and very similar to what I had in mind, I don't have much time to review full code but if these widgets do not replace the original I'll be approving this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants