You've already forked lazarus-ccr
Industrial: Make TAnalogSensor high-dpi aware.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6856 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -318,14 +318,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAnalogSensor.PaintAsNeedle;
|
procedure TAnalogSensor.PaintAsNeedle;
|
||||||
var MiddleX: Integer;
|
var
|
||||||
|
MiddleX: Integer;
|
||||||
Angle: Double;
|
Angle: Double;
|
||||||
X, Y, W, H: Integer;
|
X, Y, W, H: Integer;
|
||||||
begin
|
begin
|
||||||
X := 20;
|
X := Scale96ToFont(20);
|
||||||
Y := 23;
|
Y := Scale96ToFont(23);
|
||||||
W := ClientWidth - 2*20; //130;
|
W := ClientWidth - 2*X;
|
||||||
H := ClientHeight - 2*23; //33;
|
H := ClientHeight - 2*Y;
|
||||||
if (W < 1) or (H < 1) then Exit;
|
if (W < 1) or (H < 1) then Exit;
|
||||||
|
|
||||||
with Canvas do
|
with Canvas do
|
||||||
@@ -365,13 +366,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAnalogSensor.PaintAsHorizontal;
|
procedure TAnalogSensor.PaintAsHorizontal;
|
||||||
var MiddleX: Integer;
|
var
|
||||||
|
MiddleX: Integer;
|
||||||
X, Y, W, H: Integer;
|
X, Y, W, H: Integer;
|
||||||
begin
|
begin
|
||||||
X := 20;
|
X := Scale96ToFont(20);
|
||||||
Y := 23;
|
Y := Scale96ToFont(23);
|
||||||
W := ClientWidth - 2*20; //130;
|
W := ClientWidth - 2*X;
|
||||||
H := ClientHeight - 2*23; //33;
|
H := ClientHeight - 2*Y;
|
||||||
if (W < 1) or (H < 1) then Exit;
|
if (W < 1) or (H < 1) then Exit;
|
||||||
|
|
||||||
with Canvas do
|
with Canvas do
|
||||||
@@ -406,13 +408,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAnalogSensor.PaintAsVertical;
|
procedure TAnalogSensor.PaintAsVertical;
|
||||||
var MiddleY: Integer;
|
var
|
||||||
|
MiddleY: Integer;
|
||||||
X, Y, W, H: Integer;
|
X, Y, W, H: Integer;
|
||||||
begin
|
begin
|
||||||
X := 20;
|
X := Scale96ToFont(20);
|
||||||
Y := 23;
|
Y := Scale96ToFont(23);
|
||||||
W := ClientWidth - 2*20; //130;
|
W := ClientWidth - 2*X;
|
||||||
H := ClientHeight - 2*23; //33;
|
H := ClientHeight - 2*Y;
|
||||||
if (W < 1) or (H < 1) then Exit;
|
if (W < 1) or (H < 1) then Exit;
|
||||||
|
|
||||||
with Canvas do
|
with Canvas do
|
||||||
|
Reference in New Issue
Block a user