Fix clipping detail from the next not visible element on the options list (#321)

* decrease maximum clip rect size for options list

* respect window scaling

* move clip rect fix location
This commit is contained in:
DeaTh-G 2025-02-08 22:33:49 +01:00 committed by GitHub
parent 97b20742a3
commit 7f108285fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1157,6 +1157,8 @@ static void DrawConfigOptions()
auto clipRectMin = drawList->GetClipRectMin(); auto clipRectMin = drawList->GetClipRectMin();
auto clipRectMax = drawList->GetClipRectMax(); auto clipRectMax = drawList->GetClipRectMax();
drawList->PushClipRect({ clipRectMin.x, clipRectMin.y }, { clipRectMax.x, clipRectMax.y - Scale(5.0f) });
g_selectedItem = nullptr; g_selectedItem = nullptr;
float gridSize = Scale(GRID_SIZE); float gridSize = Scale(GRID_SIZE);
@ -1333,6 +1335,8 @@ static void DrawConfigOptions()
if (disableMoveAnimation) if (disableMoveAnimation)
g_prevSelectedRowIndex = g_selectedRowIndex; g_prevSelectedRowIndex = g_selectedRowIndex;
drawList->PopClipRect();
// Pop clip rect from DrawCategories // Pop clip rect from DrawCategories
drawList->PopClipRect(); drawList->PopClipRect();