From 367479d16393174ec68082eb58c9278350d26600 Mon Sep 17 00:00:00 2001 From: Mark Thompson <129641948+NotherNgineer@users.noreply.github.com> Date: Sat, 10 Feb 2024 02:21:35 -0600 Subject: [PATCH] Just shift menu icons up 1 row when hit bottom (#1874) --- firmware/application/ui/ui_btngrid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/application/ui/ui_btngrid.cpp b/firmware/application/ui/ui_btngrid.cpp index 101c67ec..37776f40 100644 --- a/firmware/application/ui/ui_btngrid.cpp +++ b/firmware/application/ui/ui_btngrid.cpp @@ -2,6 +2,7 @@ * Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc. * Copyright (C) 2016 Furrtek * Copyright (C) 2019 Elia Yehuda (z4ziggy) + * Copyright (C) 2023 Mark Thompson * * This file is part of PortaPack. * @@ -170,7 +171,7 @@ bool BtnGridView::set_highlighted(int32_t new_value) { if (((uint32_t)new_value > offset) && ((new_value - offset) >= displayed_max)) { // Shift BtnGridView up highlighted_item = new_value; - offset = new_value - displayed_max + rows_; + offset += rows_; update_items(); set_dirty(); } else if ((uint32_t)new_value < offset) {