zeel01 / TokenHUDArtButton

A Foundry VTT module that adds a button to the token HUD that opens the target actor's artwork.
MIT License
6 stars 5 forks source link

Image is repeated multiple times in v10 #19

Closed Oshcakes closed 1 year ago

Oshcakes commented 2 years ago

Also does not fit window when shown. image

vgeirnaert commented 2 years ago

This can easily be fixed by setting the style value of the .lightbox-image div in media-popout.html to

background-image: url('{{image}}'); background-repeat: no-repeat; background-size: contain;

@zeel01 I have a created a PR for this: https://github.com/zeel01/TokenHUDArtButton/pull/21

kiloforce commented 2 years ago

This can easily be fixed by setting the style value of the .lightbox-image div in media-popout.html to

background-image: url('{{image}}'); background-repeat: no-repeat; background-size: contain;

@zeel01 I have a created a PR for this: #21

Thanks, that worked for me!

fatigues65 commented 1 year ago

This issue arises when using .webp It does not occur when using a .png file as near as I can determine.

rlach commented 1 year ago

If someone doesn't want to edit their files "Custom CSS" module allows you to set this rule as well. Just paste this in "Global CSS" form of that module:

.lightbox-image {
  background-image: url('{{image}}'); background-repeat: no-repeat; background-size: contain;
}

I'm not sure @zeel01 is still accepting PRs for this module.

zeel01 commented 1 year ago

I think the issue here is that Foundry changed the way the popups are formatted/styled. In fact, the custom popup class might not even still be needed? I haven't had the opportunity to fully evaluate yet. But this issue should be resolved now.