Fixed more issues with grid and scroll area
This commit is contained in:
parent
0853df4d2a
commit
4e1ab6fc50
6 changed files with 9 additions and 29 deletions
|
|
@ -34,7 +34,7 @@ void GridScrollArea::layout(const Clay_ElementId& id, const Options& o) {
|
|||
size_t startIndex = rowIndex * entriesPerRow;
|
||||
size_t endIndex = std::min(rowIndex * entriesPerRow + entriesPerRow, o.entryCount);
|
||||
for(size_t i = startIndex; i < endIndex; i++) {
|
||||
gui.new_id(static_cast<int64_t>(i), [&] {
|
||||
gui.new_id(static_cast<int64_t>(i - startIndex), [&] {
|
||||
CLAY_AUTO_ID({
|
||||
.layout = {.sizing = {.width = CLAY_SIZING_FIXED(entryWidth), .height = CLAY_SIZING_FIXED(options.entryHeight)}}
|
||||
}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue