you-apps/WallYou

Scaling/positioning logic improvements

Closed this issue · 2 comments

Describe your suggested feature

Hi developers,

Although a lot of work in that respect has been done already, I believe that at the moment, the image scaling/centering logic is too complicated, not user-friendly and isn't sound to say the least. The implementation of the idea has taken a completely wrong direction and needs to be reworked.

I would love to fix it for you, but I do not know how to write code in cotlin, my programming skills are limited to mocrosoft excel, which isn't helpful at all here. I can however, offer logic that the code should follow.

The user should not have to (or be able to) select the scaling/alignment logic per image, but rather, the logic for a number of scenarios should be determined and calculated by the app automatically.

There are multiple reasons for it, the most important of which is dealing with large collections (over 100). In this case, treating each image individually becomes overwhelming.

Below are the scenarios and logic for them. Here, I will give you scenarios for 1, 2 and 3 homescreens, but it should be enough to understand the concept and apply to more screens if required.

  1. The vertical axis of any image needs to be compared to the vertical resolution of the screen. In the event that the image is smaller, it needs to be zoomed in until it equals the vertical resolution of the screen. Likewise, if it is bigger, the image will need to be zoomed out until matched. If they are equal, no action required.

  2. After step one has been completed, the horizontal axis of the image needs to be compared to that of the screen. If the value is smaller, the image will need to be zoomed in until matched. If equal or bigger, no action is required.

This will provide the most optimal image scaling for futher positioning work.

  1. After the above steps are completed, we will only focus on the horizontal axis. If the image is bigger than:
  • One screen.
    Image should be centered horizontally.

1_bigger

  • Two screens.
    Center axis of screen 1 should be image horizontal axis/2 minus screen horizontal axis/2
    Center axis of screen 2 should be image horizontal axis/2 pluss screen horizontal axis/2
    The image should scroll accordingly each time the homescreen is swiped over by the user.

2_bigger

  • 3 screens.
    Center axis of screen 1 = image horizontal axis/2 minus screen horizontal axis.
    Center axis of screen 2 should be image horizontal axis/2.
    Center axis of screen 3 should be image horizontal axis /2 plus screen horizontal axis.
    The image should scroll accordingly each time the homescreen is swiped over by the user.

3_bigger

  1. When the image resolution is smaller than:
  • the resolution of the screen *3 (if 3 screens are used)
    Center axis of screen 1 should be half of the horozontal screen resolution.
    Center axis of screen 2 should be the image horizontal axis/2.
    Center axis of screen 3 should be horizontal axis of the image minus horizontal axis of the screen/2.
    The image should scroll accordingly each time the homescreen is swiped over by the user.

3_smaller

  • the resolution of the screen *2 (if 2 screens are used)
    Center axis of screen 1 should be half of the horozontal screen resolution.
    Center axis of screen 2 should be horizontal axis of the image minus horizontal axis of the screen/2.
    The image should scroll accordingly each time the homescreen is swiped over by the user.

2_smaller

  • the resolution of the screen *1 (if 1 screens are used)
    This scenario is eliminated and made impossible during steps 1 and 2.
  1. For the lockscreen, only 1-screen logic should apply in any case after steps 1 and 2.

If the above logic is followed sequentially, it covers all possible scenarios (providing that we extend it up to a maximum of about 5 screens for all use cases).

Other details

#175
#176

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.

I'm open for pull requests, but won't personally work on that.

That's unfortunate that you don't want to improve your app, and would rather continue with the current flawed logic. So be it.