Skip to content

Commit

Permalink
fix: grid preview no longer opens in the incorrect size
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed Sep 9, 2023
1 parent 9b14e4b commit 90a7543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/modals/GridPreviewModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<ModalBody title={`${games.find((game) => game.appid == $selectedGameAppId)?.name} - ${$gridType} #${$gridModalInfo?.id}`} onClose={onClose}>
<div class="content {$gridType.split(" ").join("-").toLowerCase()}">
<div class="img-cont">
<div class="img-cont" style="max-width: {widths[$gridType]}px; max-height: {heights[$gridType]}px; width: {$gridModalInfo.width}px; height: {$gridModalInfo.height}px;">
<div class="img" class:logo-background={$gridType == GridTypes.LOGO} class:icon-background={$gridType == GridTypes.ICON} style="max-height: {heights[$gridType]}px;">
<Lazy height="{heights[$gridType]}px" fadeOption={{delay: 500, duration: 1000}}>
<img src="{$gridType == GridTypes.ICON ? $gridModalInfo?.thumb?.toString() : $gridModalInfo?.url?.toString()}" alt="{$gridModalInfo?.author?.name}'s {$gridType} image" style="max-width: {widths[$gridType]}px; max-height: {heights[$gridType]}px; width: auto; height: auto;" />
Expand Down Expand Up @@ -169,7 +169,7 @@
flex-direction: column;
}
.img-cont { padding: 10px; }
.img-cont { padding: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.img-cont > .img {
border-radius: 2px;
Expand Down

0 comments on commit 90a7543

Please sign in to comment.