quickscreen: fix MIN_LINES off-by-one

Appears to be a regression introduced in e454a39, where
MIN_LINES was increased from 4 to 5, along with changing
nb_lines <= MIN_LINES to nb_lines < MIN_LINES

The top and bottom sections are supposed to switch
from 2 to 1 lines if there are fewer available lines
than MIN_LINES.

Each of the three vertical section uses two lines,
resulting in overlapping viewports, if there are exactly
5 available lines.

Icons mentioned in the comment don't really play into
that.

Change-Id: I3a0e921d9f53a490fece0ce59457feaf84a80d3b
This commit is contained in:
Christian Soffke 2026-08-16 15:08:13 +02:00
parent cacbd9aad2
commit be62759005

View file

@ -41,9 +41,9 @@
#include "appevents.h"
#include "statusbar-skinned.h"
/* 1 top, 1 bottom, 2 on either side, 1 for the icons
* if enough space, top and bottom have 2 lines */
#define MIN_LINES 5
/* 2 lines for each of the three vertical sections (top/middle/bottom).
If less space is available, the top and bottom each lose a line. */
#define MIN_LINES (3*2)
#define MAX_NEEDED_LINES 10
/* pixels between the 2 center items minimum or between text and icons,
* and between text and parent boundaries */