Opkman: Less hint + Fix high dpi bug, when displaying rating stars. Issue #37886.

git-svn-id: trunk@64727 -
This commit is contained in:
balazs 2021-03-02 21:22:24 +00:00
parent 817c9aa159
commit 8445edd27f
4 changed files with 20 additions and 20 deletions

View File

@ -770,7 +770,7 @@ begin
if Ms.Size > 0 then if Ms.Size > 0 then
begin begin
Ms.Position := 0; Ms.Position := 0;
SetLength(AJSON, MS.Size); SetLength({%H-}AJSON, MS.Size);
MS.Read(Pointer(AJSON)^, Length(AJSON)); MS.Read(Pointer(AJSON)^, Length(AJSON));
Result := True; Result := True;
end; end;

View File

@ -283,7 +283,7 @@ begin
try try
MS.LoadFromFile(JSONFile); MS.LoadFromFile(JSONFile);
MS.Position := 0; MS.Position := 0;
SetLength(JSON, MS.Size); SetLength({%H-}JSON, MS.Size);
MS.Read(Pointer(JSON)^, Length(JSON)); MS.Read(Pointer(JSON)^, Length(JSON));
try try
SuccessfullyLoaded := SerializablePackages.JSONToPackages(JSON); SuccessfullyLoaded := SerializablePackages.JSONToPackages(JSON);

View File

@ -320,7 +320,7 @@ procedure TUpdates.CheckForOpenSSL;
var var
SysPath: WideString; SysPath: WideString;
begin begin
SetLength(SysPath, Windows.MAX_PATH); SetLength({%H-}SysPath, Windows.MAX_PATH);
SetLength(SysPath, Windows.GetSystemDirectoryW(PWideChar(SysPath), Windows.MAX_PATH)); SetLength(SysPath, Windows.GetSystemDirectoryW(PWideChar(SysPath), Windows.MAX_PATH));
Result := AppendPathDelim(String(SysPath)); Result := AppendPathDelim(String(SysPath));
end; end;

View File

@ -248,27 +248,27 @@ begin
end; end;
with Header.Columns.Add do with Header.Columns.Add do
begin begin
Position := 4; Position := 4;
Width := FVST.Scale96ToForm(280); Width := FVST.Scale96ToForm(280);
{$IFDEF LCLCarbon} {$IFDEF LCLCarbon}
Options := Options - [coResizable]; Options := Options - [coResizable];
{$ENDIF} {$ENDIF}
Text := rsMainFrm_VSTHeaderColumn_Data; Text := rsMainFrm_VSTHeaderColumn_Data;
end; end;
with Header.Columns.Add do with Header.Columns.Add do
begin begin
Position := 5; Position := 5;
Alignment := taCenter; Alignment := taCenter;
Width := FVST.Scale96ToForm(88); Width := FVST.Scale96ToForm(81);
Options := Options - [coResizable]; Options := Options - [coResizable];
Text := rsMainFrm_VSTHeaderColumn_Rating; Text := rsMainFrm_VSTHeaderColumn_Rating;
end; end;
with Header.Columns.Add do with Header.Columns.Add do
begin begin
Position := 6; Position := 6;
Alignment := taCenter; Alignment := taCenter;
Width := FVST.Scale96ToForm(20); Width := FVST.Scale96ToForm(20);
Options := Options - [coResizable]; Options := Options - [coResizable];
end; end;
Header.Options := [hoAutoResize, hoColumnResize, hoRestrictDrag, hoShowSortGlyphs, hoVisible, hoShowHint]; Header.Options := [hoAutoResize, hoColumnResize, hoRestrictDrag, hoShowSortGlyphs, hoVisible, hoShowHint];
{$IFDEF LCLCarbon} {$IFDEF LCLCarbon}
@ -313,7 +313,7 @@ begin
end; end;
FShowHintFrm := TShowHintFrm.Create(nil); FShowHintFrm := TShowHintFrm.Create(nil);
if AImgList <> nil then if AImgList <> nil then
FStarSize := FVST.Scale96ToForm(AImgList.Width) FStarSize := Application.MainForm.Scale96ToForm(AImgList.Width)
else else
FStarSize := 0; FStarSize := 0;
end; end;