summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/fpg_label.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/fpg_label.pas b/src/gui/fpg_label.pas
index 0f9c8b4b..75269246 100644
--- a/src/gui/fpg_label.pas
+++ b/src/gui/fpg_label.pas
@@ -198,8 +198,11 @@ end;
procedure TfpgCustomLabel.ResizeLabel;
begin
- if FAutoSize and not FWrapText then
+ if FAutoSize and (not FWrapText) then
+ begin
Width := FFont.TextWidth(FText);
+ Height:= FFont.Height;
+ end;
UpdateWindowPosition;
RePaint;
end;