From 4b120482e3e4d464a3b4b85b4bb0bf03584cbcd0 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 12 Jan 2026 19:33:25 -0500 Subject: [PATCH] NPR: fix uneven row height fractional scaling-related issue #2186 --- src/gui/gui.cpp | 6 +++--- src/gui/newPattern.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 377c06f90..3c0c9a7f8 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -647,7 +647,7 @@ const char* FurnaceGUI::getSystemName(DivSystem which) { } void FurnaceGUI::updateScroll(int amount) { - float lineHeight=(PAT_FONT_SIZE+2*dpiScale); + float lineHeight=round(PAT_FONT_SIZE+2*dpiScale); nextScroll=lineHeight*amount; haveHitBounds=false; } @@ -658,13 +658,13 @@ void FurnaceGUI::updateScrollRaw(float amount) { } void FurnaceGUI::addScroll(int amount) { - float lineHeight=(PAT_FONT_SIZE+2*dpiScale); + float lineHeight=round(PAT_FONT_SIZE+2*dpiScale); nextAddScroll=lineHeight*amount; haveHitBounds=false; } void FurnaceGUI::addScrollX(int amount) { - float lineHeight=(PAT_FONT_SIZE+2*dpiScale); + float lineHeight=round(PAT_FONT_SIZE+2*dpiScale); nextAddScrollX=lineHeight*amount; haveHitBounds=false; } diff --git a/src/gui/newPattern.cpp b/src/gui/newPattern.cpp index 254b34ec7..8ce41efd6 100644 --- a/src/gui/newPattern.cpp +++ b/src/gui/newPattern.cpp @@ -158,7 +158,7 @@ void FurnaceGUI::drawPatternNew() { }*/ ImGui::PushFont(patFont); - float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale); + float lineHeight=round(ImGui::GetTextLineHeight()+2*dpiScale); dummyRows=(ImGui::GetWindowSize().y/lineHeight)/2; int totalRows=e->curSubSong->patLen+dummyRows*2; int firstRow=-dummyRows+1;