Browse Source

Updated to Main Dev

Massimo Magnano 2 years ago
parent
commit
b80025e4a0

+ 8 - 3
bgracontrols.lpk

@@ -21,14 +21,19 @@
       </Parsing>
       </Parsing>
       <CodeGeneration>
       <CodeGeneration>
         <Optimizations>
         <Optimizations>
-          <OptimizationLevel Value="3"/>
+          <OptimizationLevel Value="0"/>
           <VariablesInRegisters Value="True"/>
           <VariablesInRegisters Value="True"/>
         </Optimizations>
         </Optimizations>
       </CodeGeneration>
       </CodeGeneration>
+      <Linking>
+        <Debugging>
+          <UseHeaptrc Value="True"/>
+        </Debugging>
+      </Linking>
     </CompilerOptions>
     </CompilerOptions>
     <Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
     <Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
     <License Value="Modified LGPL"/>
     <License Value="Modified LGPL"/>
-    <Version Major="7" Minor="6"/>
+    <Version Major="7" Minor="7"/>
     <Files Count="66">
     <Files Count="66">
       <Item1>
       <Item1>
         <Filename Value="atshapelinebgra.pas"/>
         <Filename Value="atshapelinebgra.pas"/>
@@ -356,7 +361,7 @@
     <RequiredPkgs Count="2">
     <RequiredPkgs Count="2">
       <Item1>
       <Item1>
         <PackageName Value="BGRABitmapPack"/>
         <PackageName Value="BGRABitmapPack"/>
-        <MinVersion Major="11" Minor="2" Release="5" Valid="True"/>
+        <MinVersion Major="11" Minor="5" Release="4" Valid="True"/>
       </Item1>
       </Item1>
       <Item2>
       <Item2>
         <PackageName Value="IDEIntf"/>
         <PackageName Value="IDEIntf"/>

+ 1 - 1
bgracontrolsinfo.pas

@@ -9,7 +9,7 @@ uses
   Classes, SysUtils;
   Classes, SysUtils;
 
 
 const
 const
-  BGRAControlsVersion = 7060000;
+  BGRAControlsVersion = 7070000;
 
 
   function BGRAControlsVersionStr: string;
   function BGRAControlsVersionStr: string;
 
 

+ 2 - 2
bgraknob.pas

@@ -160,7 +160,7 @@ begin
         v.x := v.x /(tx / 2 + 1);
         v.x := v.x /(tx / 2 + 1);
         v.y := v.y / (ty / 2 + 1);
         v.y := v.y / (ty / 2 + 1);
         //compute squared distance with scalar product
         //compute squared distance with scalar product
-        d2 := v * v;
+        d2 := v ** v;
         //interpolate as quadratic curve and apply power function
         //interpolate as quadratic curve and apply power function
         if d2 > 1 then
         if d2 > 1 then
           h := 0
           h := 0
@@ -399,7 +399,7 @@ begin
   Pos.Y := -Sin(FAngularPos) * (ClientHeight / 2);
   Pos.Y := -Sin(FAngularPos) * (ClientHeight / 2);
   if not FStartFromBottom then
   if not FStartFromBottom then
     Pos := -Pos;
     Pos := -Pos;
-  PosLen := sqrt(Pos * Pos);
+  PosLen := VectLen(Pos);
 
 
   Pos := Pos * ((PosLen - PositionMargin - FPositionWidth) / PosLen);
   Pos := Pos * ((PosLen - PositionMargin - FPositionWidth) / PosLen);
   Pos := Center + Pos;
   Pos := Center + Pos;

+ 1 - 1
bgrapascalscriptcomponent.lpk

@@ -11,7 +11,7 @@
         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
       </SearchPaths>
       </SearchPaths>
     </CompilerOptions>
     </CompilerOptions>
-    <Version Major="7" Minor="6"/>
+    <Version Major="7" Minor="7"/>
     <Files Count="3">
     <Files Count="3">
       <Item1>
       <Item1>
         <Filename Value="bgrapascalscript.pas"/>
         <Filename Value="bgrapascalscript.pas"/>

+ 1 - 0
bgrasvgtheme.pas

@@ -700,6 +700,7 @@ begin
       AImageList.Draw(AImageIndex, Bitmap, RectF(rGlyph));
       AImageList.Draw(AImageIndex, Bitmap, RectF(rGlyph));
     RenderText(r, bcFont, actualCaption, Bitmap, State <> btbsDisabled);
     RenderText(r, bcFont, actualCaption, Bitmap, State <> btbsDisabled);
 
 
+    bcFont.Free;
     ColorizeSurface(ASurface, State);
     ColorizeSurface(ASurface, State);
     DrawBitmap;
     DrawBitmap;
   end;
   end;

BIN
test/test_svg_theme/project1.ico


+ 130 - 0
test/test_svg_theme/project1.lpi

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="12"/>
+    <PathDelim Value="\"/>
+    <General>
+      <SessionStorage Value="InProjectDir"/>
+      <Title Value="project1"/>
+      <Scaled Value="True"/>
+      <ResourceType Value="res"/>
+      <UseXPManifest Value="True"/>
+      <XPManifest>
+        <DpiAware Value="True"/>
+      </XPManifest>
+      <Icon Value="0"/>
+    </General>
+    <BuildModes>
+      <Item Name="Debug" Default="True"/>
+      <Item Name="Release">
+        <CompilerOptions>
+          <Version Value="11"/>
+          <PathDelim Value="\"/>
+          <Target>
+            <Filename Value="project1"/>
+          </Target>
+          <SearchPaths>
+            <IncludeFiles Value="$(ProjOutDir)"/>
+            <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+          </SearchPaths>
+          <CodeGeneration>
+            <SmartLinkUnit Value="True"/>
+            <Optimizations>
+              <OptimizationLevel Value="3"/>
+            </Optimizations>
+          </CodeGeneration>
+          <Linking>
+            <Debugging>
+              <GenerateDebugInfo Value="False"/>
+            </Debugging>
+            <LinkSmart Value="True"/>
+            <Options>
+              <Win32>
+                <GraphicApplication Value="True"/>
+              </Win32>
+            </Options>
+          </Linking>
+        </CompilerOptions>
+      </Item>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+      <UseFileFilters Value="True"/>
+    </PublishOptions>
+    <RunParams>
+      <FormatVersion Value="2"/>
+    </RunParams>
+    <RequiredPackages>
+      <Item>
+        <PackageName Value="bgracontrols"/>
+      </Item>
+      <Item>
+        <PackageName Value="LCL"/>
+      </Item>
+    </RequiredPackages>
+    <Units>
+      <Unit>
+        <Filename Value="project1.lpr"/>
+        <IsPartOfProject Value="True"/>
+      </Unit>
+      <Unit>
+        <Filename Value="unit1.pas"/>
+        <IsPartOfProject Value="True"/>
+        <ComponentName Value="Form1"/>
+        <ResourceBaseClass Value="Form"/>
+        <UnitName Value="Unit1"/>
+      </Unit>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <Target>
+      <Filename Value="project1"/>
+    </Target>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+    </SearchPaths>
+    <Parsing>
+      <SyntaxOptions>
+        <IncludeAssertionCode Value="True"/>
+      </SyntaxOptions>
+    </Parsing>
+    <CodeGeneration>
+      <Checks>
+        <IOChecks Value="True"/>
+        <RangeChecks Value="True"/>
+        <OverflowChecks Value="True"/>
+        <StackChecks Value="True"/>
+      </Checks>
+      <VerifyObjMethodCallValidity Value="True"/>
+    </CodeGeneration>
+    <Linking>
+      <Debugging>
+        <DebugInfoType Value="dsDwarf3"/>
+        <UseHeaptrc Value="True"/>
+        <TrashVariables Value="True"/>
+        <UseExternalDbgSyms Value="True"/>
+      </Debugging>
+      <Options>
+        <Win32>
+          <GraphicApplication Value="True"/>
+        </Win32>
+      </Options>
+    </Linking>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions>
+      <Item>
+        <Name Value="EAbort"/>
+      </Item>
+      <Item>
+        <Name Value="ECodetoolError"/>
+      </Item>
+      <Item>
+        <Name Value="EFOpenError"/>
+      </Item>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 25 - 0
test/test_svg_theme/project1.lpr

@@ -0,0 +1,25 @@
+program project1;
+
+{$mode objfpc}{$H+}
+
+uses
+  {$IFDEF UNIX}
+  cthreads,
+  {$ENDIF}
+  {$IFDEF HASAMIGA}
+  athreads,
+  {$ENDIF}
+  Interfaces, // this includes the LCL widgetset
+  Forms, Unit1
+  { you can add units after this };
+
+{$R *.res}
+
+begin
+  RequireDerivedFormResource:=True;
+  Application.Scaled:=True;
+  Application.Initialize;
+  Application.CreateForm(TForm1, Form1);
+  Application.Run;
+end.
+

File diff suppressed because it is too large
+ 24881 - 0
test/test_svg_theme/unit1.lfm


+ 33 - 0
test/test_svg_theme/unit1.pas

@@ -0,0 +1,33 @@
+unit Unit1;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, BGRASVGImageList,
+  BGRAThemeButton, BGRASVGTheme;
+
+type
+
+  { TForm1 }
+
+  TForm1 = class(TForm)
+    BGRASVGImageList1: TBGRASVGImageList;
+    BGRASVGTheme1: TBGRASVGTheme;
+    BGRAThemeButton1: TBGRAThemeButton;
+  private
+
+  public
+
+  end;
+
+var
+  Form1: TForm1;
+
+implementation
+
+{$R *.lfm}
+
+end.
+

+ 2 - 2
update_bgracontrols_force.json

@@ -8,13 +8,13 @@
       "ForceNotify" : true,
       "ForceNotify" : true,
       "InternalVersion" : 25,
       "InternalVersion" : 25,
       "Name" : "bgracontrols.lpk",
       "Name" : "bgracontrols.lpk",
-      "Version" : "7.6.0.0"
+      "Version" : "7.7.0.0"
     },
     },
     {
     {
       "ForceNotify" : false,
       "ForceNotify" : false,
       "InternalVersion" : 1,
       "InternalVersion" : 1,
       "Name" : "bgrapascalscriptcomponent.lpk",
       "Name" : "bgrapascalscriptcomponent.lpk",
-      "Version" : "7.6.0.0"
+      "Version" : "7.7.0.0"
     }
     }
   ]
   ]
 }
 }

Some files were not shown because too many files changed in this diff