openplanet-nl / plugin-manager

In-game plugin manager, installer, and updater.
6 stars 5 forks source link

Allow arbitrary image ratios in plugin images #27

Closed sylae closed 1 year ago

sylae commented 1 year ago

will provide compatibility for openplanet-nl/website#35 once that drops, in the meantime this of course renders perfectly fine with the existing image ratios

image image

codecat commented 1 year ago

Does it make sense to still have some of this code for the main image after recently reverting the change on the site?

sylae commented 1 year ago

Does it make sense to still have some of this code for the main image after recently reverting the change on the site?

it doesn't! i went ahead and cut that bit out so it's just the screenshots being adjusted :)

codecat commented 1 year ago
  1. What happens when screenshots are wider than the thumbnail box, instead of just taller?
  2. Is the Dummy call necessary if the ratio is 16:9?
  3. Should the height value of Dummy be scaled, or is it ok?
sylae commented 1 year ago
  1. What happens when screenshots are wider than the thumbnail box, instead of just taller?

I thought i'd accounted for this, but in testing it seems not :pensive:

image

will do a quick fix :spop:

  1. Is the Dummy call necessary if the ratio is 16:9?

I'll include a check to exclude it if no space is being added, but as-is I'm not seeing any issues with 0-width dummy space render-wise.

  1. Should the height value of Dummy be scaled, or is it ok?

It doesn't need to be scaled, any arbitrary value should be fine. I'll just set it to like 1 or some shit :p

sylae commented 1 year ago

pushed a fix, now renders properly on all aspects with as liitle Dummy() as needed

image

(tall, square, thicc, 16x9)