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