From ccb4cbedf1acc04174711ba6c06efad56a6665f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Stensg=C3=A5rd?= Date: Sun, 6 Jul 2025 23:27:26 +0200 Subject: opplysning: stop drawing events before exceeding bottom of screen --- opplysning.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opplysning.c b/opplysning.c index cfc0009..0f8b338 100644 --- a/opplysning.c +++ b/opplysning.c @@ -224,6 +224,8 @@ draw_events(int x, int y, size_t numevents, for (size_t i = 0; i < numevents; ++i) { const struct event *e = &events[i]; if (year != e->year || month != e->month || day != e->day) { + if (SCREEN_H - 2 * R.font_h.baseSize < y) + break; year = e->year; month = e->month; day = e->day; -- cgit v1.2.3