industrial: Fix lcl scaling for TA3nalogGauge. Adapt sample project.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7300 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-01-19 16:44:30 +00:00
parent 8724ce88e4
commit 5cfe05ca7b
4 changed files with 81 additions and 90 deletions

View File

@@ -24,7 +24,6 @@
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="0"/>
</RunParams>
<RequiredPackages Count="1">
<Item1>

View File

@@ -1,7 +1,7 @@
object MainForm: TMainForm
Left = 427
Left = 430
Height = 483
Top = 104
Top = 138
Width = 779
Caption = 'AntiAliased Analog Gauge demo'
ClientHeight = 483
@@ -11,7 +11,6 @@ object MainForm: TMainForm
OnCreate = FormCreate
Position = poDefaultPosOnly
LCLVersion = '2.1.0.0'
Scaled = False
object Panel1: TPanel
Left = 0
Height = 216

View File

@@ -136,8 +136,7 @@ type
procedure CaptionBoxClick(Sender: TObject);
procedure CaptionEditChange(Sender: TObject);
procedure CloseButtonClick(Sender: TObject);
procedure AboutLabelMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure AboutLabelMouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
procedure AboutLabelClick(Sender: TObject);
private
AnalogGauge1: TA3nalogGauge;
@@ -195,7 +194,7 @@ begin
Left := 490;
Top := 16;
Width := 278;
Height := 200; //245;
Height := 200;
Anchors := [akRight, akTop, akBottom];
Angle := 180;
Caption := 'mV';
@@ -206,7 +205,7 @@ begin
CenterRadEdit.Value := AnalogGauge1.CenterRadius;
CircleRadEdit.Value := AnalogGauge1.CircleRadius;
MarginEdit.Value := AnalogGauge1.Margin;
ScaleMaxEdit.Value := AnalogGauge1.Scale;
ScaleMaxEdit.Value := AnalogGauge1.ScaleMax;
AngleEdit.Value := AnalogGauge1.Angle;
MinimEdit.Value := AnalogGauge1.IndMinimum;
MaximEdit.Value := AnalogGauge1.IndMaximum;
@@ -267,8 +266,8 @@ begin
V := 0;
FDelta := -FDelta
end else
if V > AnalogGauge1.Scale then begin
V := AnalogGauge1.Scale;
if V > AnalogGauge1.ScaleMax then begin
V := AnalogGauge1.ScaleMax;
FDelta := -FDelta
end;
AnalogGauge1.Position := V;
@@ -461,9 +460,9 @@ end;
procedure TMainForm.ScaleMaxEditChange(Sender: TObject);
begin
if ScaleMaxEdit.Text <> '' then begin
AnalogGauge1.Scale := ScaleMaxEdit.Value;
AnalogGauge2.Scale := ScaleMaxEdit.Value;
AnalogGauge3.Scale := ScaleMaxEdit.Value;
AnalogGauge1.ScaleMax := ScaleMaxEdit.Value;
AnalogGauge2.ScaleMax := ScaleMaxEdit.Value;
AnalogGauge3.ScaleMax := ScaleMaxEdit.Value;
end;
end;