Merge branch 'empty-text-extent'

Make Get[MultiLine]TextExtent() behave consistently for empty strings on
all platforms, in particular return (0, 0) size for them from
GetTextExtent() in wxGTK, which is an incompatible change but is needed
to make it behave in the same way as the others.

See https://github.com/wxWidgets/wxWidgets/pull/1970
This commit is contained in:
Vadim Zeitlin
2020-07-16 11:43:05 +02:00
8 changed files with 99 additions and 84 deletions

View File

@@ -128,6 +128,10 @@ protected:
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL);
// Get line height: used when the line is empty because CallGetTextExtent()
// would just return (0, 0) in this case.
int GetEmptyLineHeight();
// Return a valid font: if one was given to us in the ctor, use this one,
// otherwise use the current font of the associated wxDC or wxWindow.
wxFont GetFont() const;