Skip to content

Commit

Permalink
Merge pull request #141 from bgrabitmap/dev-bgracontrols
Browse files Browse the repository at this point in the history
Dev bgracontrols v7.6
  • Loading branch information
circular17 authored May 27, 2023
2 parents 47f38d2 + 8677569 commit 3d61696
Show file tree
Hide file tree
Showing 11 changed files with 25,097 additions and 8 deletions.
9 changes: 7 additions & 2 deletions bgracontrols.lpk
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
</Parsing>
<CodeGeneration>
<Optimizations>
<OptimizationLevel Value="3"/>
<OptimizationLevel Value="0"/>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
</Debugging>
</Linking>
</CompilerOptions>
<Description Value="BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications."/>
<License Value="Modified LGPL"/>
<Version Major="7" Minor="6"/>
<Version Major="7" Minor="7"/>
<Files Count="66">
<Item1>
<Filename Value="atshapelinebgra.pas"/>
Expand Down
2 changes: 1 addition & 1 deletion bgracontrolsinfo.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface
Classes, SysUtils;

const
BGRAControlsVersion = 7060000;
BGRAControlsVersion = 7070000;

function BGRAControlsVersionStr: string;

Expand Down
4 changes: 2 additions & 2 deletions bgraknob.pas
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ procedure TBGRAKnob.CreateKnobBmp;
v.x := v.x /(tx / 2 + 1);
v.y := v.y / (ty / 2 + 1);
//compute squared distance with scalar product
d2 := v * v;
d2 := v ** v;
//interpolate as quadratic curve and apply power function
if d2 > 1 then
h := 0
Expand Down Expand Up @@ -399,7 +399,7 @@ procedure TBGRAKnob.Paint;
Pos.Y := -Sin(FAngularPos) * (ClientHeight / 2);
if not FStartFromBottom then
Pos := -Pos;
PosLen := sqrt(Pos * Pos);
PosLen := VectLen(Pos);

Pos := Pos * ((PosLen - PositionMargin - FPositionWidth) / PosLen);
Pos := Center + Pos;
Expand Down
2 changes: 1 addition & 1 deletion bgrapascalscriptcomponent.lpk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Version Major="7" Minor="6"/>
<Version Major="7" Minor="7"/>
<Files Count="3">
<Item1>
<Filename Value="bgrapascalscript.pas"/>
Expand Down
1 change: 1 addition & 0 deletions bgrasvgtheme.pas
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ procedure TBGRASVGTheme.DrawButton(Caption: string;
AImageList.Draw(AImageIndex, Bitmap, RectF(rGlyph));
RenderText(r, bcFont, actualCaption, Bitmap, State <> btbsDisabled);

bcFont.Free;
ColorizeSurface(ASurface, State);
DrawBitmap;
end;
Expand Down
Binary file added test/test_svg_theme/project1.ico
Binary file not shown.
130 changes: 130 additions & 0 deletions test/test_svg_theme/project1.lpi
Original file line number Diff line number Diff line change
@@ -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 changes: 25 additions & 0 deletions test/test_svg_theme/project1.lpr
Original file line number Diff line number Diff line change
@@ -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.

Loading

0 comments on commit 3d61696

Please sign in to comment.