From 12428a9fcd8d4a6dd88cb1f6012a5d2c22638956 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 22 Jan 2022 03:15:43 -0500 Subject: [PATCH] fix scrolling on differing font sizes --- src/gui/gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index f4f5b8354..71ffabbb2 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -166,12 +166,12 @@ bool FurnaceGUI::decodeNote(const char* what, short& note, short& octave) { } void FurnaceGUI::updateScroll(int amount) { - float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale); + float lineHeight=(patFont->FontSize+2*dpiScale); nextScroll=lineHeight*amount; } void FurnaceGUI::addScroll(int amount) { - float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale); + float lineHeight=(patFont->FontSize+2*dpiScale); nextAddScroll=lineHeight*amount; }