TextLayout height when empty


#1

Hi,

There is an issue in TextLayout::createLayoutWithBalancedLineLengths, it returns a very large height if the given text string is empty. This happens regardless of the value of JUCE_USE_DIRECTWRITE. I'm testing this on Windows 7.

This function is used in the AlertWindow, so if you create one with an empty title, then you end up with a very tall empty space on top. The call in question is in juce_AlertWindow.cpp after line 365

Maybe we are not supposed to have alertwindows without a title text. In our case the window is created by a ThreadWithProgressWindow, and there is no need for us to display more than one line of text.

--
Roeland

 


#2

OK! This is fixed in the newest tip. Thank you for reporting