Browse Source

Fixes in test projects

lainz 8 years ago
parent
commit
0e7eb13d70

+ 2 - 4
test/test_bgracustomdrawn/test_bgracustomdrawn.lpi

@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <CONFIG>
   <ProjectOptions>
-    <Version Value="9"/>
+    <Version Value="10"/>
     <PathDelim Value="\"/>
     <General>
       <SessionStorage Value="InProjectDir"/>
       <MainUnit Value="0"/>
       <Title Value="BGRA Custom Drawn"/>
+      <Scaled Value="True"/>
       <ResourceType Value="res"/>
       <UseXPManifest Value="True"/>
       <XPManifest>
@@ -16,9 +17,6 @@
     <i18n>
       <EnableI18N LFM="False"/>
     </i18n>
-    <VersionInfo>
-      <StringTable ProductVersion=""/>
-    </VersionInfo>
     <BuildModes Count="2">
       <Item1 Name="Release" Default="True"/>
       <Item2 Name="Debug">

+ 1 - 0
test/test_bgracustomdrawn/test_bgracustomdrawn.lpr

@@ -13,6 +13,7 @@ uses
 {$R *.res}
 
 begin
+  Application.Scaled:=True;
   Application.Title:='BGRA Custom Drawn';
   RequireDerivedFormResource:=True;
   Application.Initialize;

+ 12 - 6
test/test_bgracustomdrawn/umain.lfm

@@ -3,15 +3,17 @@ object frmMain: TfrmMain
   Height = 300
   Top = 178
   Width = 400
+  AutoSize = True
   Caption = 'BGRA Custom Drawn'
   ClientHeight = 300
   ClientWidth = 400
+  DesignTimePPI = 120
   OnCreate = FormCreate
-  LCLVersion = '1.7'
+  LCLVersion = '1.9.0.0'
   object BCPanel1: TBCPanel
     Left = 0
-    Height = 274
-    Top = 26
+    Height = 276
+    Top = 24
     Width = 400
     Align = alClient
     Background.Color = 5460819
@@ -224,6 +226,7 @@ object frmMain: TfrmMain
       Top = 224
       Width = 142
       Caption = 'BCDRadioButton2'
+      Checked = True
       DrawStyle = dsDefault
     end
     object BCDRadioButton3: TBCDRadioButton
@@ -232,6 +235,7 @@ object frmMain: TfrmMain
       Top = 200
       Width = 142
       Caption = 'BCDRadioButton3'
+      Checked = True
       DrawStyle = dsDefault
       Enabled = False
     end
@@ -241,15 +245,17 @@ object frmMain: TfrmMain
       Top = 224
       Width = 142
       Caption = 'BCDRadioButton4'
+      Checked = True
       DrawStyle = dsDefault
       Enabled = False
     end
   end
   object BCToolBar1: TBCToolBar
     Left = 0
-    Height = 26
+    Height = 24
     Top = 0
     Width = 400
+    AutoSize = True
     Caption = 'BCToolBar1'
     ShowCaptions = True
     TabOrder = 1
@@ -281,7 +287,7 @@ object frmMain: TfrmMain
   object Timer1: TTimer
     Interval = 100
     OnTimer = Timer1Timer
-    left = 233
-    top = 118
+    Left = 233
+    Top = 118
   end
 end

+ 4 - 4
test/test_bgracustomdrawn/umain.pas

@@ -64,8 +64,8 @@ implementation
 
 procedure TfrmMain.FormCreate(Sender: TObject);
 begin
-  Self.AutoAdjustLayout(lapAutoAdjustForDPI, Self.DesignTimeDPI,
-    Screen.PixelsPerInch, Self.Width, ScaleX(Self.Width, Self.DesignTimeDPI));
+  //Self.AutoAdjustLayout(lapAutoAdjustForDPI, Self.DesignTimeDPI,
+  //  Screen.PixelsPerInch, Self.Width, ScaleX(Self.Width, Self.DesignTimeDPI));
 end;
 
 procedure TfrmMain.BCToolBar1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
@@ -172,8 +172,8 @@ begin
   inherited AutoAdjustLayout(AMode, AFromDPI, AToDPI, AOldFormWidth,
     ANewFormWidth);
 
-  BCToolBar1.ButtonWidth := ScaleX(BCToolBar1.ButtonWidth, Self.DesignTimeDPI);
-  BCToolBar1.ButtonHeight := ScaleY(BCToolBar1.ButtonHeight, Self.DesignTimeDPI);
+  //BCToolBar1.ButtonWidth := ScaleX(BCToolBar1.ButtonWidth, Self.DesignTimeDPI);
+  //BCToolBar1.ButtonHeight := ScaleY(BCToolBar1.ButtonHeight, Self.DesignTimeDPI);
   BCToolBar1.Height := BCToolBar1.ButtonHeight + 4;
 end;
 

+ 2 - 2
test/test_extra/slicescaling_customdrawn_win7/customdrawn_windows7.pas

@@ -492,7 +492,7 @@ begin
 
   FreeBitmapResources;
 
-  if FileExistsUTF8(FFolder) then
+  if FileExists(FFolder) then
   begin
     debugln('Loading From File.');
     // general
@@ -522,7 +522,7 @@ begin
     debugln('Resources Loaded.');
     FResourcesLoaded := True;
   end
-  else if DirectoryExistsUTF8(FFolder) then
+  else if DirectoryExists(FFolder) then
   begin
     debugln('Loading From Folder.');
     // general

+ 1 - 4
test/test_extra/slicescaling_customdrawn_win7/test_customdrawn_win7.lpi

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <CONFIG>
   <ProjectOptions>
-    <Version Value="9"/>
+    <Version Value="10"/>
     <PathDelim Value="\"/>
     <General>
       <SessionStorage Value="InProjectDir"/>
@@ -15,9 +15,6 @@
     <i18n>
       <EnableI18N LFM="False"/>
     </i18n>
-    <VersionInfo>
-      <StringTable ProductVersion=""/>
-    </VersionInfo>
     <BuildModes Count="2">
       <Item1 Name="Debug" Default="True"/>
       <Item2 Name="Release">

BIN
test/test_extra/slicescaling_customdrawn_win7/test_customdrawn_win7.res