Paperize icon indicating copy to clipboard operation
Paperize copied to clipboard

Makes scaling optional to keep original image dimension

Open repraze opened this issue 1 year ago • 3 comments

Open for comments on overall solution.

  • Adds a scaling toggle to skip the fill/fit/stretch mode.
  • Renamed scaling to scalingMode and reused scaling to contain Boolean value.
  • Makes scaling enabled by default. Could potentially change that. (Still needs proper testing on a fresh start with no data)

This solution allows the OS to do the sizing and enables proper parallax on pixel OS.

Disabled Enabled
Screenshot_20240820-224955.png Screenshot_20240820-225004.png

Considerations

  • An alternative implementation would be to add another ScalingConstants with None or Default to let the OS take over the scaling. The radio input seems crowded for a fourth option though. I thought the additional checkbox was in line with other toggleable settings.
  • The new Resize string is not properly translated. I wasn't sure about the process here.
  • Not sure if renaming scaling to scalingMode might have non-backward compatible issue with reading the saved settings. If so, we could keep the string binding the same for backward compatibility.

relates to https://github.com/Anthonyy232/Paperize/issues/92

repraze avatar Aug 20 '24 21:08 repraze

An observation:

Turns out pixel OS does crop the image to allow parallax - it takes into account the number of home screens and will do a 'fill' with overflow on the right.

The first screen is centered on the image and you can swipe right to reveal more.

By setting a raw image without resize, parallax works, but it will be left aligned. The first screen shows the left of the image and you can swipe right to reveal more.

I think it might be hard to account for all manufacturer implementations of the home screen/wallpaper positioning. This solution is good enough, and the user can always crop/position the images to achieve the same effect.

repraze avatar Aug 20 '24 22:08 repraze

Yeah, unfortunately I can't even check the amount of home screens -- even within the WallpaperManager class, many are restricted as system APIs which is a little frustrating as the feature set is very neutered.

Anthonyy232 avatar Aug 20 '24 23:08 Anthonyy232

I'll play with it some more. I'll make this a draft until it's in a ready state.

I have a few ideas to make resizing / scaling more powerful. But I want to make sure the UI stays nice and friendly.

repraze avatar Aug 21 '24 07:08 repraze

Implemented this in commit https://github.com/Anthonyy232/Paperize/commit/9f67243f0dd5d2ea350408dea2bad2bdaa1ea082 by adding another scaling option. Will be closing this, feel free to create another PR if you figure this out!

image

Anthonyy232 avatar Sep 09 '24 21:09 Anthonyy232