Skip to content

Prevent the card display from appearing stretched#243

Merged
edo9300 merged 7 commits into
edo9300:masterfrom
Larikk:cardimg-width
Jul 24, 2022
Merged

Prevent the card display from appearing stretched#243
edo9300 merged 7 commits into
edo9300:masterfrom
Larikk:cardimg-width

Conversation

@Larikk

@Larikk Larikk commented Jul 12, 2022

Copy link
Copy Markdown

If the window is overproportionally wide the card display appears stretched. This change caps the width so that the card maintains its aspect ratio in this situations.

This is a subset of #237 . The buttons next to the card image are not modified here and the image appears squished horizontally instead of being scaled down when the windows width is underproportional.

Larikk and others added 7 commits July 12, 2022 19:50
If the window is overproportionally wide the card display appears stretched. This change caps the width so that the card maintains its aspect ratio in this situations.
Retrieve it from imgCard itself
Also directly set the alignment for imgCard to EGUIA_SCALE so that its sizes are automatically updated when wCardImg is resized
Cleanup the resizing function and move variables into game.cpp rather than having them in the header
@edo9300 edo9300 merged commit a002d2d into edo9300:master Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants