You've already forked lazarus-ccr
RxFPC:temp fix save property WIDTH and HEGHT on screen with PPI<>96
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -60,3 +60,4 @@
|
||||
{.$DEFINE OLD_fpSPREADSHEET}
|
||||
|
||||
{.$DEFINE DEVELOPER_RX}
|
||||
{$DEFINE FIX_WIDTH_WIDE_STRING96}
|
||||
|
@ -47,6 +47,7 @@ type
|
||||
FSeparateFiles: boolean;
|
||||
protected
|
||||
function GetIniFileName: string; override;
|
||||
procedure FinishPropertyList(List: TStrings); override;
|
||||
public
|
||||
procedure StorageNeeded(ReadOnly: Boolean); override;
|
||||
{ Public declarations }
|
||||
@ -55,7 +56,7 @@ type
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses rxapputils, LazUTF8, FileUtil, LazFileUtils, IniFiles;
|
||||
uses rxapputils, LazUTF8, FileUtil, LazFileUtils, IniFiles, StrUtils;
|
||||
|
||||
{ TRxIniPropStorage }
|
||||
|
||||
@ -81,6 +82,29 @@ begin
|
||||
Result:=UTF8ToSys(Result);
|
||||
end;
|
||||
|
||||
procedure TRxIniPropStorage.FinishPropertyList(List: TStrings);
|
||||
{$IFDEF FIX_WIDTH_WIDE_STRING96}
|
||||
var
|
||||
S: String;
|
||||
i: Integer;
|
||||
K: SizeInt;
|
||||
{$ENDIF FIX_WIDTH_WIDE_STRING96}
|
||||
begin
|
||||
{$IFDEF FIX_WIDTH_WIDE_STRING96}
|
||||
if Screen.PixelsPerInch<>96 then
|
||||
for i:=List.Count-1 downto 0 do
|
||||
begin
|
||||
S:=UpperCase(List[I]);
|
||||
K:=Pos('.', S);
|
||||
if K > 0 then
|
||||
Delete(S, 1, K);
|
||||
if (S = 'WIDTH') or (S='HEIGHT') then
|
||||
List.Delete(i);
|
||||
end;
|
||||
{$ENDIF FIX_WIDTH_WIDE_STRING96}
|
||||
inherited FinishPropertyList(List);
|
||||
end;
|
||||
|
||||
procedure TRxIniPropStorage.StorageNeeded(ReadOnly: Boolean);
|
||||
var
|
||||
F: Boolean;
|
||||
|
@ -3781,6 +3781,9 @@ begin
|
||||
C := ColumnByCaption(ColumName);
|
||||
if Assigned(C) then
|
||||
begin
|
||||
{$IFDEF FIX_WIDTH_WIDE_STRING96}
|
||||
if Screen.PixelsPerInch = 96 then
|
||||
{$ENDIF}
|
||||
C.Width := FPropertyStorageLink.Storage.ReadInteger(S1 + sWidth, C.Width);
|
||||
C.Visible := FPropertyStorageLink.Storage.ReadInteger(S1 + sVisible, Ord(C.Visible)) = 1;
|
||||
C.Index := Min(FPropertyStorageLink.Storage.ReadInteger(S1 + sIndex, C.Index), Columns.Count - 1);
|
||||
|
Reference in New Issue
Block a user