Set a minimum width when only compiling icons

This commit is contained in:
Michiel Sikma
2016-12-16 15:18:01 +01:00
parent 45c0b609c4
commit 2105ac4bbd

View File

@@ -491,6 +491,13 @@ class IconStack
$width = $fit['fit']['x'] + $this->pkmn_img_width;
}
// See if the width is at least the size of 32 Pokémon icons.
// Note that padding has already been added to pkmn_img_width.
$min_width = (($this->pkmn_img_width) * $this->pkmn_row_count) + $this->pkmn_img_padding;
if ($width < $min_width) {
$width = $min_width;
}
$height = $fit['fit']['y'] + $this->pkmn_img_height;
$this->pkmn_sect_width = intval($width);