Visual Console Refactor: changed the default size for the items which use icons

Former-commit-id: 689c7e3769ff1554ab2a5c9701d47117a122595a
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-23 15:09:23 +02:00
parent 2f397b16df
commit 26b3fd23f5
3 changed files with 27 additions and 9 deletions

View File

@ -238,9 +238,15 @@ final class Group extends Item
// If the width or the height are equal to 0 we will extract them
// from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
$data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1];
// TODO: This will be the default behaviour after we finish the
// builder. Don't delete this code.
// $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
// $data['width'] = $sizeImage[0];
// $data['height'] = $sizeImage[1];
// Default value. Will be replaced by a dynamic image size
// calculation after the phase 3.
$data['width'] = 70;
$data['height'] = 70;
}
$data['html'] = '<img src="'.$data['statusImageSrc'].'">';

View File

@ -118,9 +118,15 @@ final class Icon extends Item
// If the width or the height are equal to 0 we will extract them
// from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
$data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1];
// TODO: This will be the default behaviour after we finish the
// builder. Don't delete this code.
// $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
// $data['width'] = $sizeImage[0];
// $data['height'] = $sizeImage[1];
// Default value. Will be replaced by a dynamic image size
// calculation after the phase 3.
$data['width'] = 70;
$data['height'] = 70;
}
return $data;

View File

@ -177,9 +177,15 @@ final class StaticGraph extends Item
// If the width or the height are equal to 0 we will extract them
// from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
$data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1];
// TODO: This will be the default behaviour after we finish the
// builder. Don't delete this code.
// $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
// $data['width'] = $sizeImage[0];
// $data['height'] = $sizeImage[1];
// Default value. Will be replaced by a dynamic image size
// calculation after the phase 3.
$data['width'] = 70;
$data['height'] = 70;
}
// Get last value.