Fixed dropdown

This commit is contained in:
Yousef Khadadeh 2026-04-01 18:00:22 +03:00
parent f944cb8a68
commit b50cab2d33
11 changed files with 135 additions and 96 deletions

View file

@ -14,7 +14,7 @@ void top_to_bottom_window_popup_layout(GUIManager& gui, const char* id, Clay_Siz
},
.backgroundColor = convert_vec4<Clay_Color>(gui.io.theme->backColor1),
.cornerRadius = CLAY_CORNER_RADIUS(10),
.floating = { .zIndex = gui.zIndex, .attachTo = CLAY_ATTACH_TO_PARENT },
.floating = { .zIndex = gui.get_z_index(), .attachTo = CLAY_ATTACH_TO_PARENT },
.border = {.color = convert_vec4<Clay_Color>(gui.io.theme->fillColor2), .width = CLAY_BORDER_OUTSIDE(1)}
}) {
innerContent();

View file

@ -11,7 +11,7 @@ void paint_circle_popup_menu(GUIManager& gui, const char* id, const Vector2f& ce
},
.floating = {
.offset = {centerPos.x() - size * 0.5f, centerPos.y() - size * 0.5f},
.zIndex = gui.zIndex,
.zIndex = gui.get_z_index(),
.attachTo = CLAY_ATTACH_TO_ROOT
}
}) {

View file

@ -9,8 +9,8 @@ void scroll_area_many_entries(GUIManager& gui, const char* id, const ScrollBarMa
.clipHorizontal = options.clipHorizontal,
.clipVertical = true,
.showScrollbarY = true,
.innerContent = [&, options](const ScrollArea::InnerContentParameters& params) {
options.innerContentExtraCallback(params);
.innerContent = [&](const ScrollArea::InnerContentParameters& params) {
if(options.innerContentExtraCallback) options.innerContentExtraCallback(params);
float absScrollAmount = std::fabs(params.scrollOffset.y());
size_t startPoint = absScrollAmount / options.entryHeight;