Add a workaround to a scroll area bug

This commit is contained in:
Yousef Khadadeh 2026-04-30 19:17:21 +03:00
parent 91ff487edd
commit 7437ecdae6
5 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#include "ScrollAreaHelpers.hpp"
#include <clay.h>
namespace GUIStuff { namespace ElementHelpers {
void SCROLL_AREA_BUG_WORKAROUND() {
CLAY_AUTO_ID({}){}
}
}}

View file

@ -0,0 +1,10 @@
#pragma once
namespace GUIStuff { namespace ElementHelpers {
// FIXME: Currently, when two scroll areas in popups are created in the "same place" (different ids), only the first scroll area that's displayed will
// have scrolling capabilities, while the second scroll area wont get any scroll data (Clay_GetScrollContainerData gives 0s for content and container dimensions)
// We can workaround this by adding invisible padding to the second scroll area (which is what this function does), but ideally this should be fixed later
void SCROLL_AREA_BUG_WORKAROUND();
}}