diff --git a/components/onlinepackagemanager/opkman_showhint.lfm b/components/onlinepackagemanager/opkman_showhint.lfm index a96cf56d28..bfe70521e6 100644 --- a/components/onlinepackagemanager/opkman_showhint.lfm +++ b/components/onlinepackagemanager/opkman_showhint.lfm @@ -14,7 +14,6 @@ object ShowHintFrm: TShowHintFrm OnDestroy = FormDestroy OnKeyUp = FormKeyUp PopupMode = pmExplicit - LCLVersion = '1.9.0.0' object pnMain: TPanel AnchorSideLeft.Control = Owner AnchorSideRight.Control = Owner @@ -22,16 +21,17 @@ object ShowHintFrm: TShowHintFrm AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom Left = 10 - Height = 315 - Top = 0 + Height = 305 + Top = 10 Width = 543 Align = alClient Anchors = [akLeft, akRight, akBottom] BorderSpacing.Left = 10 + BorderSpacing.Top = 10 BorderSpacing.Right = 10 BorderSpacing.Bottom = 10 BevelInner = bvLowered - ClientHeight = 315 + ClientHeight = 305 ClientWidth = 543 Color = 15460842 ParentColor = False @@ -106,7 +106,7 @@ object ShowHintFrm: TShowHintFrm AnchorSideBottom.Control = pnMain AnchorSideBottom.Side = asrBottom Left = 12 - Height = 228 + Height = 218 Top = 83 Width = 519 HorzScrollBar.Page = 1 diff --git a/components/onlinepackagemanager/opkman_showhint.pas b/components/onlinepackagemanager/opkman_showhint.pas index f03b72fc08..b6df577a2b 100644 --- a/components/onlinepackagemanager/opkman_showhint.pas +++ b/components/onlinepackagemanager/opkman_showhint.pas @@ -173,7 +173,7 @@ begin Data := VisualTree.VST.GetNodeData(ANode); Caption := Format(rsMainFrm_rsPackageInformation, [Data^.PackageDisplayName]); pnPackageName.Caption := Data^.PackageDisplayName; - mDescription.Text := Data^.CommunityDescription; + CalcHeight(mDescription, Data^.CommunityDescription); for I := FFrames.Count - 1 downto 0 do begin CurFrame := TfrShowHint(FFrames.Items[I]); @@ -197,8 +197,8 @@ begin FFrames.Add(CurFrame); CurFrame.pnBase.BorderSpacing.Bottom := 3; CurFrame.Parent := sbLazPackages; - CurFrame.CalcHeight(CurFrame.mDescription, Trim(LazPackage.Description)); - CurFrame.CalcHeight(CurFrame.mLicense, Trim(LazPackage.License)); + CalcHeight(CurFrame.mDescription, Trim(LazPackage.Description)); + CalcHeight(CurFrame.mLicense, Trim(LazPackage.License)); CurFrame.Height := CurFrame.pnPackageName.Height + CurFrame.pnDescription.Height + CurFrame.pnLicense.Height + CurFrame.BorderSpacing.Top + CurFrame.pnBase.BorderSpacing.Bottom; TotHeight := TotHeight + CurFrame.Height; @@ -212,7 +212,7 @@ begin TfrShowHint(FFrames.Items[0]).BorderSpacing.Bottom := 0; end; TfrShowHint(FFrames.Items[FFrames.Count - 1]).pnBase.BorderSpacing.Top := 0; - TotHeight := TotHeight + pnPackageName.Height + pnDescription.Height + 15; + TotHeight := TotHeight + pnPackageName.Height + pnDescription.Height + 25; if (TotHeight < 51) or (TotHeight > 365) then TotHeight := 365; Self.Height := TotHeight; diff --git a/components/onlinepackagemanager/opkman_showhintbase.pas b/components/onlinepackagemanager/opkman_showhintbase.pas index e7dadf687a..3bce5c597d 100644 --- a/components/onlinepackagemanager/opkman_showhintbase.pas +++ b/components/onlinepackagemanager/opkman_showhintbase.pas @@ -48,9 +48,10 @@ type private public procedure Init; - procedure CalcHeight(AMemo: TMemo; AText: String); end; + procedure CalcHeight(AMemo: TMemo; AText: String); + implementation uses opkman_const, opkman_options; @@ -75,7 +76,7 @@ begin end; end; -procedure TfrShowHint.CalcHeight(AMemo: TMemo; AText: String); +procedure CalcHeight(AMemo: TMemo; AText: String); var R: TRect; Increase: Integer;