Opkman: Fix high-DPI. Issue #31782.

git-svn-id: trunk@54923 -
This commit is contained in:
balazs 2017-05-14 12:09:28 +00:00
parent b426df3b1d
commit a71ab6fde4

View File

@ -32,7 +32,7 @@ interface
uses uses
Classes, SysUtils, contnrs, Math, dateutils, Classes, SysUtils, contnrs, Math, dateutils,
// LCL // LCL
Controls, Graphics, Menus, Dialogs, Forms, LCLIntf, Buttons, Controls, Graphics, Menus, Dialogs, Forms, LCLType, LCLIntf, Buttons,
// OpkMan // OpkMan
opkman_VirtualTrees, opkman_common, opkman_serializablepackages, opkman_const, opkman_VirtualTrees, opkman_common, opkman_serializablepackages, opkman_const,
opkman_options, opkman_packagedetailsfrm; opkman_options, opkman_packagedetailsfrm;
@ -179,24 +179,24 @@ begin
Images := AImgList; Images := AImgList;
PopupMenu := APopupMenu; PopupMenu := APopupMenu;
Color := clBtnFace; Color := clBtnFace;
DefaultNodeHeight := 25; DefaultNodeHeight := MulDiv(25, Screen.PixelsPerInch, 96);
Indent := 22; Indent := 22;
TabOrder := 1; TabOrder := 1;
DefaultText := ''; DefaultText := '';
Header.AutoSizeIndex := 4; Header.AutoSizeIndex := 4;
Header.Height := 25; Header.Height := MulDiv(25, Screen.PixelsPerInch, 96);
Colors.DisabledColor := clBlack; Colors.DisabledColor := clBlack;
with Header.Columns.Add do with Header.Columns.Add do
begin begin
Position := 0; Position := 0;
Width := 270; Width := MulDiv(270, Screen.PixelsPerInch, 96);
Text := rsMainFrm_VSTHeaderColumn_PackageName; Text := rsMainFrm_VSTHeaderColumn_PackageName;
end; end;
with Header.Columns.Add do with Header.Columns.Add do
begin begin
Position := 1; Position := 1;
Alignment := taCenter; Alignment := taCenter;
Width := 90; Width := MulDiv(90, Screen.PixelsPerInch, 96);
Options := Options - [coResizable]; Options := Options - [coResizable];
Text := rsMainFrm_VSTHeaderColumn_Installed; Text := rsMainFrm_VSTHeaderColumn_Installed;
end; end;
@ -204,7 +204,7 @@ begin
begin begin
Position := 2; Position := 2;
Alignment := taCenter; Alignment := taCenter;
Width := 90; Width := MulDiv(90, Screen.PixelsPerInch, 96);
Options := Options - [coResizable]; Options := Options - [coResizable];
Text := rsMainFrm_VSTHeaderColumn_Repository; Text := rsMainFrm_VSTHeaderColumn_Repository;
end; end;
@ -212,14 +212,14 @@ begin
begin begin
Position := 3; Position := 3;
Alignment := taCenter; Alignment := taCenter;
Width := 90; Width := MulDiv(90, Screen.PixelsPerInch, 96);
Options := Options - [coResizable]; Options := Options - [coResizable];
Text := rsMainFrm_VSTHeaderColumn_Update; Text := rsMainFrm_VSTHeaderColumn_Update;
end; end;
with Header.Columns.Add do with Header.Columns.Add do
begin begin
Position := 4; Position := 4;
Width := 280; Width := MulDiv(280, Screen.PixelsPerInch, 96);//280;
Options := Options - [coResizable]; Options := Options - [coResizable];
Text := rsMainFrm_VSTHeaderColumn_Data; Text := rsMainFrm_VSTHeaderColumn_Data;
end; end;
@ -235,7 +235,7 @@ begin
begin begin
Position := 6; Position := 6;
Alignment := taCenter; Alignment := taCenter;
Width := 20; Width := MulDiv(20, Screen.PixelsPerInch, 96);
Options := Options - [coResizable]; Options := Options - [coResizable];
end; end;
Header.Options := [hoAutoResize, hoColumnResize, hoRestrictDrag, hoShowSortGlyphs, hoVisible, hoAutoSpring]; Header.Options := [hoAutoResize, hoColumnResize, hoRestrictDrag, hoShowSortGlyphs, hoVisible, hoAutoSpring];