NPR: fix uneven row height

fractional scaling-related
issue #2186
This commit is contained in:
tildearrow 2026-01-12 19:33:25 -05:00
parent dee078e34c
commit 4b120482e3
2 changed files with 4 additions and 4 deletions

View file

@ -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;
}

View file

@ -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;