From 4ad530d1c00f649dcd02b818a3ccc7ded0aaf12d Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Sat, 22 Oct 2022 13:43:41 +0200 Subject: Do not render a margin around the header if there are any meters --- Header.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Header.c') diff --git a/Header.c b/Header.c index 8dff89b8..1953c020 100644 --- a/Header.c +++ b/Header.c @@ -286,10 +286,19 @@ int Header_calculateHeight(Header* this) { } maxHeight = MAXIMUM(maxHeight, height); } + + if (maxHeight == pad) { + maxHeight = 0; + this->pad = 0; + } else { + this->pad = pad; + } + if (this->settings->screenTabs) { maxHeight++; } + this->height = maxHeight; - this->pad = pad; + return maxHeight; } -- cgit v1.2.3