Skip to content

Commit

Permalink
Fix wrong computation of alert description height
Browse files Browse the repository at this point in the history
Refs: #100
  • Loading branch information
orontee committed Nov 23, 2024
1 parent 6f3a4bb commit 0bd799c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Changed

- Fix wrong computation of alert description height
[#100](https://github.com/orontee/taranis/issues/100)

### Removed

## [1.10.0 - 2024-11-20]
Expand Down
4 changes: 2 additions & 2 deletions src/alerts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 0bd799c

Please sign in to comment.