From 2d991a420df9876031668992793e12a9180f4110 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 25 Nov 2017 11:38:52 +0100 Subject: [PATCH] support larger icons --- lam/lib/html.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lam/lib/html.inc b/lam/lib/html.inc index 7ccbe71f..b9c5d863 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -2716,6 +2716,8 @@ class htmlSubTitle extends htmlElement { private $image = null; /** optional ID for this element (e.g. to use for JavaScript) */ private $id = null; + /** show large icon */ + private $largeIcon = false; /** * Constructor. @@ -2723,13 +2725,15 @@ class htmlSubTitle extends htmlElement { * @param String $label label * @param String $image optional image * @param String $id optional ID for this element (e.g. to use for JavaScript) + * @param bool $largeIcon show large (32x32px) icon instead of small one (16x16px) */ - function __construct($label, $image = null, $id = null) { + function __construct($label, $image = null, $id = null, $largeIcon = false) { $this->label = htmlspecialchars($label); $this->image = htmlspecialchars($image); $this->id = htmlspecialchars($id); // the title should not end at a table cell $this->colspan = 100; + $this->largeIcon = $largeIcon; } /** @@ -2751,7 +2755,8 @@ class htmlSubTitle extends htmlElement { echo "
\n"; echo "

\n"; if ($this->image != null) { - echo '' . $this->label . ' '; + $size = $this->largeIcon ? 32 : 16; + echo '' . $this->label . ' '; } echo $this->label; echo "

\n";