mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Fix non-zero height for empty strings with D2D
http://rainmeter.net/forum/viewtopic.php?p=92801
This commit is contained in:
parent
15c65384f6
commit
35f2e1591e
@ -404,9 +404,12 @@ bool CanvasD2D::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForma
|
||||
rect.Height = metrics.height;
|
||||
lines = metrics.lineCount;
|
||||
|
||||
// GDI+ draws multi-line text even though the last line may be clipped slightly at the bottom.
|
||||
// This is a workaround to emulate that behaviour.
|
||||
rect.Height += 1.0f;
|
||||
if (rect.Height > 0.0f)
|
||||
{
|
||||
// GDI+ draws multi-line text even though the last line may be clipped slightly at the
|
||||
// bottom. This is a workaround to emulate that behaviour.
|
||||
rect.Height += 1.0f;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user