From 2abca0b460a8633248e42d53eb7f4361c62a0436 Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Wed, 19 Dec 2018 18:12:46 +0100 Subject: [PATCH] Do not reserve space for Logo if empty Signed-off-by: Stefano Babic --- common.lua | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/common.lua b/common.lua index bc07504..0bfed7f 100644 --- a/common.lua +++ b/common.lua @@ -21,17 +21,19 @@ function RescueGUIHeader.new(class, self) { Text = self.Description or "", } - - self.logo = ui.ImageWidget:new - { - Width = "fill", - Height = "fill", - Mode = "inert", - Image = self.Image, - HAlign = "center", - } grp:addMember(self.title) - grp:addMember(self.logo) + + if self.Image then + self.logo = ui.ImageWidget:new + { + Width = "fill", + Height = "fill", + Mode = "inert", + Image = self.Image, + HAlign = "center", + } + grp:addMember(self.logo) + end return grp end