Skip to content

Commit

Permalink
[Bug] Fix NEWLINES wrap mode not being respected correctly (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
SogoCZE authored Oct 4, 2024
1 parent 2cf212e commit c02db35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c02db35

Please sign in to comment.