From c02db35554f1af7a3ab1ff93f2a4cccd23427446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Sm=C4=9Bl=C3=BD?= Date: Fri, 4 Oct 2024 03:30:49 +0200 Subject: [PATCH] [Bug] Fix NEWLINES wrap mode not being respected correctly (#36) --- clay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clay.h b/clay.h index 8ea3ec0..2e22059 100644 --- a/clay.h +++ b/clay.h @@ -1968,7 +1968,7 @@ void Clay__CalculateFinalLayout() { .length = 0, }; // Short circuit all wrap calculations if wrap mode is none - if (textConfig->wrapMode == CLAY_TEXT_WRAP_NONE || (containerElement->dimensions.width == textElementData->preferredDimensions.width)) { + if (textConfig->wrapMode == CLAY_TEXT_WRAP_NONE || (containerElement->dimensions.width == textElementData->preferredDimensions.width && textConfig->wrapMode != CLAY_TEXT_WRAP_NEWLINES)) { Clay_LayoutElementArray_Add(&Clay__layoutElements, CLAY__INIT(Clay_LayoutElement) { .text = text, .dimensions = textElementData->preferredDimensions,