mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 19:04:13 +02:00
fixed autosizing a disabled label (issue #1382)
git-svn-id: trunk@8046 -
This commit is contained in:
parent
8721a38171
commit
d7f3e8f9a2
@ -42,8 +42,9 @@ begin
|
||||
if WordWrap then inc(Flags,DT_WordBreak);
|
||||
DrawText(DC, PChar(Caption), Length(Caption), R, Flags);
|
||||
SelectObject(DC, OldFont);
|
||||
AWidth := R.Right - R.Left;
|
||||
AHeight := R.Bottom - R.Top;
|
||||
// add one to be able to display disabled label
|
||||
AWidth := R.Right - R.Left + 1;
|
||||
AHeight := R.Bottom - R.Top + 1;
|
||||
finally
|
||||
ReleaseDC(Parent.Handle, DC);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user