diff --git a/bricks.xml b/bricks.xml index 3d1df7b2766677407c9c7e1a41f01d1529263b3e..4c175c92fd6980d9f01e45a07c9d370eddc71d19 100644 --- a/bricks.xml +++ b/bricks.xml @@ -408,6 +408,10 @@ <locale group="quiqqer/presentation-bricks" var="control.IconBox.imgIconSize"/> </setting> + <setting name="imgSquare" type="checkbox"> + <locale group="quiqqer/presentation-bricks" + var="control.IconBox.imgSquare"/> + </setting> <setting name="entries" type="hidden" data-qui="package/quiqqer/presentation-bricks/bin/Controls/IconBoxSettings"> diff --git a/locale.xml b/locale.xml index 32d49dee688eb0e38e1900346736ab51138c915f..94b8692ef0ed309ee6586901276840744fd5d58e 100644 --- a/locale.xml +++ b/locale.xml @@ -333,6 +333,10 @@ <de><![CDATA[Inhalt zentrieren]]></de> <en><![CDATA[Center content]]></en> </locale> + <locale name="control.IconBox.imgSquare"> + <de><![CDATA[Bild in ein Quadrat umwandeln]]></de> + <en><![CDATA[Transform image to square]]></en> + </locale> <locale name="control.IconBox.template"> <de><![CDATA[Vorlage]]></de> diff --git a/src/QUI/PresentationBricks/Controls/IconBox.php b/src/QUI/PresentationBricks/Controls/IconBox.php index b5cf5ab514adcace5f83f336e36abf0de94d3a93..e99d0b201c94b7fe77cf4ff9660e4908d6d97e5f 100644 --- a/src/QUI/PresentationBricks/Controls/IconBox.php +++ b/src/QUI/PresentationBricks/Controls/IconBox.php @@ -28,7 +28,8 @@ public function __construct($attributes = []) 'centerContent' => false, 'entriesPerLine' => 2, 'iconSize' => 'small', - 'imgIconSize' => '50px' + 'imgIconSize' => '50px', + 'imgSquare' => false ]); parent::__construct($attributes); @@ -53,6 +54,7 @@ public function getBody() $entriesPerLine = $this->getAttribute('entriesPerLine'); $iconSize = $this->getAttribute('iconSize'); $imgIconSize = $this->getAttribute('imgIconSize'); + $imgSquare = $this->getAttribute('imgSquare'); $enabledEntries = []; foreach ($entries as $entry) { @@ -69,6 +71,7 @@ public function getBody() 'entriesPerLine' => $entriesPerLine, 'iconSize' => $iconSize, 'imgIconSize' => $imgIconSize, + 'imgSquare' => $imgSquare, 'entries' => $enabledEntries ]);