Harmony icon indicating copy to clipboard operation
Harmony copied to clipboard

Details View: Fade background image to transparency effect not applied correctly when switching between games with different background image dimensions

Open jansteffen opened this issue 1 year ago • 2 comments

Bug Description

The new "Fade background image to transparency" effect for the Details View is applied incorrectly during the transition animation when switching between different games, if those games have background images with different image dimensions.

To Reproduce

Make sure the following two settings are enabled:

  • Playnite Settings -> Appearance -> General -> Animate background image transitions
  • ThemeModifier Settings -> Details View -> Fade background image to transparency effect

Then find two games in your library who's background images have different image dimensions.

Switching between those games should cause the fade to transparency to bug out. It seems the fade is only applied to the image that is (vertically) larger, leaving the smaller image with a harsh cutoff. Once the transition animation ends, it corrects itself, but it still looks jarring.

Extensions log

No response

Screenshots

https://github.com/darklinkpower/Harmony/assets/1278331/6dbf87b6-f65c-4cd6-b6be-f19b589812d9

jansteffen avatar Oct 18 '23 12:10 jansteffen

It's an issue due to how the background image behaves. It works this way:

  1. On first selection, it loads the game background image (1920x1080px)
  2. On second selection and if the animation is enabled this happens simultaneously: a. First image is transitioned from full opacity -> full transparency b. Second (new) image (1920x620px) is loaded and changed from full transparency -> Full opacity

Both images are inside the same container/control, which means that this container will be the size of the largest image during this transition, in this case being 1920x1080px. After finalizing the transition I explained, the older image will be removed and the container will adjust to the exact size of the new image (1920x620px). The same happens with the opacity effect used for the background image, after finalizing the animation, it will adjust its size but this will be very noticeable if the images were of different dimensions.

I hope my explanation was clear. Unfortunately this means that there isn't a way to fix this. The only solutions are:

  1. Disable support of using the transition animation
  2. Separate animation setting from the Playnite setting and make it an option ThemeModifier. That way they could be enabled separately and people who use images of different dimensions could keep it disabled.

darklinkpower avatar Oct 18 '23 17:10 darklinkpower

Thanks for the response, looks like I'll just have to make sure I select images of the same size everywhere lol

jansteffen avatar Oct 18 '23 19:10 jansteffen