You've already forked lazarus-ccr
RxFPC:try to fix scaling forms in TRxIniPropStorage
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6725 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -60,4 +60,4 @@
|
|||||||
{.$DEFINE OLD_fpSPREADSHEET}
|
{.$DEFINE OLD_fpSPREADSHEET}
|
||||||
|
|
||||||
{.$DEFINE DEVELOPER_RX}
|
{.$DEFINE DEVELOPER_RX}
|
||||||
{$DEFINE FIX_WIDTH_WIDE_STRING96}
|
{.$DEFINE FIX_WIDTH_WIDE_STRING96}
|
||||||
|
@ -48,6 +48,7 @@ type
|
|||||||
protected
|
protected
|
||||||
function GetIniFileName: string; override;
|
function GetIniFileName: string; override;
|
||||||
procedure FinishPropertyList(List: TStrings); override;
|
procedure FinishPropertyList(List: TStrings); override;
|
||||||
|
function DoReadString(const Section, Ident, DefaultValue: string): string; override;
|
||||||
public
|
public
|
||||||
procedure StorageNeeded(ReadOnly: Boolean); override;
|
procedure StorageNeeded(ReadOnly: Boolean); override;
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
@ -56,7 +57,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses rxapputils, LazUTF8, FileUtil, LazFileUtils, IniFiles, StrUtils;
|
uses rxapputils, LazUTF8, FileUtil, LazFileUtils, IniFiles, StrUtils, LCLType;
|
||||||
|
|
||||||
{ TRxIniPropStorage }
|
{ TRxIniPropStorage }
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxIniPropStorage.FinishPropertyList(List: TStrings);
|
procedure TRxIniPropStorage.FinishPropertyList(List: TStrings);
|
||||||
{$IFDEF FIX_WIDTH_WIDE_STRING96}
|
{$IfDef FIX_WIDTH_WIDE_STRING96}
|
||||||
var
|
var
|
||||||
S: String;
|
S: String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -105,6 +106,31 @@ begin
|
|||||||
inherited FinishPropertyList(List);
|
inherited FinishPropertyList(List);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRxIniPropStorage.DoReadString(const Section, Ident,
|
||||||
|
DefaultValue: string): string;
|
||||||
|
var
|
||||||
|
S: String;
|
||||||
|
ASize: LongInt;
|
||||||
|
ASize1: Integer;
|
||||||
|
begin
|
||||||
|
Result := inherited DoReadString(Section, Ident, DefaultValue);
|
||||||
|
{$IfNDef FIX_WIDTH_WIDE_STRING96}
|
||||||
|
S:=UpperCase(Ident);
|
||||||
|
if (Pos('WIDTH', S) > 0) or (Pos('HEIGHT', S) > 0) then
|
||||||
|
begin
|
||||||
|
if Assigned(Screen) then
|
||||||
|
begin
|
||||||
|
ASize:=StrToIntDef(Result, -1);
|
||||||
|
if ASize>-1 then
|
||||||
|
begin
|
||||||
|
ASize1 := MulDiv(ASize, Screen.PixelsPerInch, 96);
|
||||||
|
Result := IntToStr(ASize1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{$EndIf}
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxIniPropStorage.StorageNeeded(ReadOnly: Boolean);
|
procedure TRxIniPropStorage.StorageNeeded(ReadOnly: Boolean);
|
||||||
var
|
var
|
||||||
F: Boolean;
|
F: Boolean;
|
||||||
|
Reference in New Issue
Block a user