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 // If the width or the height are equal to 0 we will extract them
// from the real image size. // from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) { if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath); // TODO: This will be the default behaviour after we finish the
$data['width'] = $sizeImage[0]; // builder. Don't delete this code.
$data['height'] = $sizeImage[1]; // $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'].'">'; $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 // If the width or the height are equal to 0 we will extract them
// from the real image size. // from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) { if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath); // TODO: This will be the default behaviour after we finish the
$data['width'] = $sizeImage[0]; // builder. Don't delete this code.
$data['height'] = $sizeImage[1]; // $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; 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 // If the width or the height are equal to 0 we will extract them
// from the real image size. // from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) { if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath); // TODO: This will be the default behaviour after we finish the
$data['width'] = $sizeImage[0]; // builder. Don't delete this code.
$data['height'] = $sizeImage[1]; // $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. // Get last value.