Page 1 of 1

Flag on user page should not have both width and height set to preserve aspect ratio

Posted: Fri Mar 24, 2023 8:21 am
by tobbi
On https://pokerth.net/player?u=tobbi you can see that the European flag appears distorted.

That's because the dimensions are fixed to 40x20 px which doesn't fit the aspect ratio.

Only setting the height fixes the issue.

Re: Flag on user page should not have both width and height set to preserve aspect ratio

Posted: Fri Mar 24, 2023 12:14 pm
by boehmi
Not all flags we have have the same aspect ratio. Some are 2:1, some 3:2 and some have very odd aspect ratios. I guess we could set the width fixed and scale the height accordingly. sp0ck?

Re: Flag on user page should not have both width and height set to preserve aspect ratio

Posted: Sat Mar 25, 2023 10:44 am
by tobbi
I feel like setting the height fixed is better because horizontal space is limited, as opposed to virtual space.

Re: Flag on user page should not have both width and height set to preserve aspect ratio

Posted: Sat Mar 25, 2023 8:49 pm
by sp0ck
Using a fixed height only in this case really is a game changer - thank you for reporting! 🤓

Re: Flag on user page should not have both width and height set to preserve aspect ratio

Posted: Mon Apr 03, 2023 9:56 pm
by tobbi
Spock: same issue applies to the leaderboard.