Compare commits

..

1 Commits

Author SHA1 Message Date
Sayed Murtadha Ahmed
51bfa8f02c
Merge 23f70e0477 into c2c445e455 2025-01-11 22:54:24 +01:00
7 changed files with 4 additions and 5 deletions

View File

@ -269,7 +269,7 @@ TypedConfig :: struct {
id: ElementId,
}
ErrorType :: enum EnumBackingType {
ErrorType :: enum {
TEXT_MEASUREMENT_FUNCTION_NOT_PROVIDED,
ARENA_CAPACITY_EXCEEDED,
ELEMENTS_CAPACITY_EXCEEDED,

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
clay.h
View File

@ -2804,8 +2804,7 @@ void Clay__CalculateFinalLayout() {
Clay__AddRenderCommand(renderCommand);
if (borderConfig->betweenChildren.width > 0 && borderConfig->betweenChildren.color.a > 0) {
Clay_RectangleElementConfig *rectangleConfig = Clay__StoreRectangleElementConfig(CLAY__INIT(Clay_RectangleElementConfig) {.color = borderConfig->betweenChildren.color});
float halfGap = layoutConfig->childGap / 2;
Clay_Vector2 borderOffset = { (float)layoutConfig->padding.x - halfGap, (float)layoutConfig->padding.y - halfGap };
Clay_Vector2 borderOffset = { (float)layoutConfig->padding.x, (float)layoutConfig->padding.y };
if (layoutConfig->layoutDirection == CLAY_LEFT_TO_RIGHT) {
for (int32_t i = 0; i < currentElement->childrenOrTextContent.children.length; ++i) {
Clay_LayoutElement *childElement = Clay_LayoutElementArray_Get(&context->layoutElements, currentElement->childrenOrTextContent.children.elements[i]);
@ -2817,7 +2816,7 @@ void Clay__CalculateFinalLayout() {
.commandType = CLAY_RENDER_COMMAND_TYPE_RECTANGLE,
});
}
borderOffset.x += (childElement->dimensions.width + (float)layoutConfig->childGap);
borderOffset.x += (childElement->dimensions.width + (float)layoutConfig->childGap / 2);
}
} else {
for (int32_t i = 0; i < currentElement->childrenOrTextContent.children.length; ++i) {
@ -2830,7 +2829,7 @@ void Clay__CalculateFinalLayout() {
.commandType = CLAY_RENDER_COMMAND_TYPE_RECTANGLE,
});
}
borderOffset.y += (childElement->dimensions.height + (float)layoutConfig->childGap);
borderOffset.y += (childElement->dimensions.height + (float)layoutConfig->childGap / 2);
}
}
}