From c713ff6f9b668c4a8b33bbbb6543beefaf65c593 Mon Sep 17 00:00:00 2001 From: Matthias Meulien Date: Sat, 23 Nov 2024 17:31:07 +0100 Subject: [PATCH] Fix wrong computation of alert description height Refs: #100 Signed-off-by: Matthias Meulien --- NEWS.md | 7 +++++++ src/alerts.cc | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 26c8ebe..06d2de4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.10.1 - 2024-11-23] + +### Changed + +- Fix wrong computation of alert description height + [#100](https://github.com/orontee/taranis/issues/100) + ## [1.10.0 - 2024-11-20] ### Added diff --git a/src/alerts.cc b/src/alerts.cc index 202e5b7..d8d65ed 100644 --- a/src/alerts.cc +++ b/src/alerts.cc @@ -149,8 +149,8 @@ void AlertViewer::identify_scrollable_area() { this->alert_description_text.c_str(), ALIGN_LEFT); this->min_scrollable_view_offset = - -std::max(0, alert_title_height + description_height - - this->scrollable_view_rectangle.h); + -std::max(0, alert_title_height + 2 * AlertViewer::vertical_padding + + description_height - this->scrollable_view_rectangle.h); } void AlertViewer::update_title_text() {