mirror of
https://github.com/nicbarker/clay.git
synced 2025-01-23 18:06:04 +00:00
Fix a bug with borders that could cause duplicate IDs
This commit is contained in:
parent
d2e6be64a9
commit
ff3b69d94f
4
clay.h
4
clay.h
@ -2683,10 +2683,10 @@ void Clay__CalculateFinalLayout() {
|
|||||||
Clay_BoundingBox currentElementBoundingBox = currentElementData->boundingBox;
|
Clay_BoundingBox currentElementBoundingBox = currentElementData->boundingBox;
|
||||||
Clay_BorderElementConfig *borderConfig = Clay__FindElementConfigWithType(currentElement, CLAY__ELEMENT_CONFIG_TYPE_BORDER_CONTAINER).borderElementConfig;
|
Clay_BorderElementConfig *borderConfig = Clay__FindElementConfigWithType(currentElement, CLAY__ELEMENT_CONFIG_TYPE_BORDER_CONTAINER).borderElementConfig;
|
||||||
Clay_RenderCommand renderCommand = CLAY__INIT(Clay_RenderCommand) {
|
Clay_RenderCommand renderCommand = CLAY__INIT(Clay_RenderCommand) {
|
||||||
.commandType = CLAY_RENDER_COMMAND_TYPE_BORDER,
|
|
||||||
.boundingBox = currentElementBoundingBox,
|
.boundingBox = currentElementBoundingBox,
|
||||||
.config = { .borderElementConfig = borderConfig },
|
.config = { .borderElementConfig = borderConfig },
|
||||||
.id = currentElement->id,
|
.id = Clay__RehashWithNumber(currentElement->id, 4),
|
||||||
|
.commandType = CLAY_RENDER_COMMAND_TYPE_BORDER,
|
||||||
};
|
};
|
||||||
Clay__AddRenderCommand(renderCommand);
|
Clay__AddRenderCommand(renderCommand);
|
||||||
if (borderConfig->betweenChildren.width > 0 && borderConfig->betweenChildren.color.a > 0) {
|
if (borderConfig->betweenChildren.width > 0 && borderConfig->betweenChildren.color.a > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user