mirror of
				https://github.com/RetroDECK/ES-DE.git
				synced 2025-04-10 19:15:13 +00:00 
			
		
		
		
	Fixed an issue where horizontally scrolling text containers sometimes had an incorrect vertical offset
This commit is contained in:
		
							parent
							
								
									d7da0a768b
								
							
						
					
					
						commit
						ac7729b9ac
					
				|  | @ -472,7 +472,7 @@ void TextComponent::onTextChanged() | |||
|     float offsetY {0.0f}; | ||||
| 
 | ||||
|     if (mHorizontalScrolling) { | ||||
|         if (lineHeight > mSize.y) | ||||
|         if (lineHeight > mSize.y && mSize.y != 0.0f) | ||||
|             offsetY = (mSize.y - lineHeight) / 2.0f; | ||||
|         mTextCache = std::shared_ptr<TextCache>( | ||||
|             font->buildTextCache(text, 0.0f, offsetY, mColor, mLineSpacing)); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Leon Styhre
						Leon Styhre