diff --git a/components/onlinepackagemanager/opkman_mainfrm.pas b/components/onlinepackagemanager/opkman_mainfrm.pas index 3e5246ff99..b1ac22c42f 100644 --- a/components/onlinepackagemanager/opkman_mainfrm.pas +++ b/components/onlinepackagemanager/opkman_mainfrm.pas @@ -558,7 +558,8 @@ begin cbPackageCategory.Visible := False; pnFilter.Visible := True; edFilter.Text := ''; - edFilter.SetFocus; + if edFilter.CanFocus then + edFilter.SetFocus; end; 2: begin pnFilter.Visible := False; @@ -566,7 +567,8 @@ begin cbPackageState.Visible := False; cbPackageCategory.Visible := True; cbPackageCategory.ItemIndex := 0; - cbPackageCategory.SetFocus; + if cbPackageCategory.CanFocus then + cbPackageCategory.SetFocus; end; 3: begin pnFilter.Visible := False; @@ -574,7 +576,8 @@ begin cbPackageState.Visible := True; cbPackageCategory.Visible := False; cbPackageState.ItemIndex := 0; - cbPackageState.SetFocus; + if cbPackageState.CanFocus then + cbPackageState.SetFocus; end; 10: begin pnFilter.Visible := False; @@ -582,7 +585,8 @@ begin cbPackageType.Visible := True; cbPackageCategory.Visible := False; cbPackageType.ItemIndex := 0; - cbPackageType.SetFocus; + if cbPackageType.CanFocus then + cbPackageType.SetFocus; end; end; cbPackageState.Height := cbFilterBy.Height; diff --git a/components/onlinepackagemanager/opkman_showhint.pas b/components/onlinepackagemanager/opkman_showhint.pas index d549ba64de..f03b72fc08 100644 --- a/components/onlinepackagemanager/opkman_showhint.pas +++ b/components/onlinepackagemanager/opkman_showhint.pas @@ -195,7 +195,7 @@ begin CurFrame.Init; CurFrame.pnPackageName.Caption := ' ' + LazPackage.Name; FFrames.Add(CurFrame); - CurFrame.pnBase.BorderSpacing.Bottom := 5; + CurFrame.pnBase.BorderSpacing.Bottom := 3; CurFrame.Parent := sbLazPackages; CurFrame.CalcHeight(CurFrame.mDescription, Trim(LazPackage.Description)); CurFrame.CalcHeight(CurFrame.mLicense, Trim(LazPackage.License)); @@ -206,11 +206,15 @@ begin end; Node := VisualTree.VST.GetNextSibling(Node); end; -// if FFrames.Count > 1 then + if FFrames.Count > 1 then + begin TfrShowHint(FFrames.Items[0]).pnBuffer.Visible := True; - TotHeight := TotHeight + pnPackageName.Height + pnDescription.Height + 25; - if (TotHeight < 51) or (TotHeight > 350) then - TotHeight := 350; + 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; + if (TotHeight < 51) or (TotHeight > 365) then + TotHeight := 365; Self.Height := TotHeight; sbLazPackages.SetFocus; end;