coil: force all images to a 1:1 aspect ratio

Crop all images to a 1:1 aspect ratio.

Sometimes cover art will not be a square. I never realized this because
all covers in my music library are square. This led to many strange bugs
that I would rather avoid, so create a new transformation that crops the
image to a 1:1 aspect ratio.

The reason why we use a transformation is that it won't be dependent on
the actual state of the ImageView, which is what would happen if we
used ScaleType.CENTER_CROP. In the case that we use a very weird hacky
ImageView like in the widgets, doing such would result in any cropping
not actually working correctly. It's better to do it in the
Transformation stage simply to ensure consistency.
This commit is contained in:
OxygenCobalt
2022-02-21 20:00:30 -07:00
parent 6fc3c9374c
commit e1dbe6c40c
9 changed files with 89 additions and 54 deletions
+3
View File
@@ -5,6 +5,9 @@
#### What's Improved
- Shuffle and Repeat mode buttons now have more contrast when they are turned on
#### What's Changed
- All cover art is now cropped to a 1:1 aspect ratio
#### Dev/Meta
- Enabled elevation drop shadows below Android P for consistency
- Reworked dynamic color usage