diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index aa4b3e41f1..3321e0daaf 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -1167,6 +1167,13 @@ begin Rect.Right := Rect.Right + Abs(aABC.abcC); end; + + // Sometimes the underline does not appear for some sizes. + // A workaround is to move the bottom edge of the rect down by one pixel. + // https://forum.lazarus.freepascal.org/index.php/topic,57021.msg424606.html#msg424606 + if lf.lfUnderline <> 0 then + inc(Rect.Bottom); + end; end;