mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 00:26:17 +00:00 
			
		
		
		
	[Bug] Fix NEWLINES wrap mode not being respected correctly (#36)
This commit is contained in:
		
							parent
							
								
									2cf212e992
								
							
						
					
					
						commit
						c02db35554
					
				
							
								
								
									
										2
									
								
								clay.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue