diff --git a/components/rx/trunk/rx.inc b/components/rx/trunk/rx.inc index 744d7f215..3774703cb 100644 --- a/components/rx/trunk/rx.inc +++ b/components/rx/trunk/rx.inc @@ -60,3 +60,4 @@ {.$DEFINE OLD_fpSPREADSHEET} {.$DEFINE DEVELOPER_RX} +{$DEFINE FIX_WIDTH_WIDE_STRING96} diff --git a/components/rx/trunk/rxcontrols/rxinipropstorage.pas b/components/rx/trunk/rxcontrols/rxinipropstorage.pas index 67741a3bf..d5e130a41 100644 --- a/components/rx/trunk/rxcontrols/rxinipropstorage.pas +++ b/components/rx/trunk/rxcontrols/rxinipropstorage.pas @@ -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; diff --git a/components/rx/trunk/rxdb/rxdbgrid.pas b/components/rx/trunk/rxdb/rxdbgrid.pas index b162497cc..faf6fb189 100644 --- a/components/rx/trunk/rxdb/rxdbgrid.pas +++ b/components/rx/trunk/rxdb/rxdbgrid.pas @@ -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);