From 62564bfea68d0885fa9c31d8df7e32ff7872a0f8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 8 Jan 2026 03:57:42 -0500 Subject: [PATCH] implement overflow highlight --- src/gui/newPattern.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/gui/newPattern.cpp b/src/gui/newPattern.cpp index 9cac2b5ed..eae3655ea 100644 --- a/src/gui/newPattern.cpp +++ b/src/gui/newPattern.cpp @@ -1122,6 +1122,9 @@ void FurnaceGUI::drawPatternNew() { bool isPlaying=e->isPlaying(); pos=top; pos.y+=lineHeight*rowsBegin; + if (settings.overflowHighlight) { + dl->PushClipRect(ImVec2(prevClipRect.Min.x,topHeaders.y+sizeHeaders.y),prevClipRect.Max); + } for (int j=rowsBegin; j=0 && ordcurSubSong->ordersLen && (settings.viewPrevPattern || ord==curOrder)) { @@ -1146,11 +1149,19 @@ void FurnaceGUI::drawPatternNew() { } if (thisRowBg) { - dl->AddRectFilled( - ImVec2(top.x+patChanX[0],pos.y), - ImVec2(top.x+patChanX[chans],pos.y+lineHeight), - thisRowBg - ); + if (settings.overflowHighlight) { + dl->AddRectFilled( + ImVec2(winRect.Min.x,pos.y), + ImVec2(winRect.Max.x,pos.y+lineHeight), + thisRowBg + ); + } else { + dl->AddRectFilled( + ImVec2(top.x+patChanX[0],pos.y), + ImVec2(top.x+patChanX[chans],pos.y+lineHeight), + thisRowBg + ); + } } } if (++row>=e->curSubSong->patLen) { @@ -1159,6 +1170,9 @@ void FurnaceGUI::drawPatternNew() { } pos.y+=lineHeight; } + if (settings.overflowHighlight) { + dl->PopClipRect(); + } } // selection background