LCL: TPromptDialog: support ChangeScale

git-svn-id: trunk@55533 -
This commit is contained in:
ondrej 2017-07-18 19:05:01 +00:00
parent c4c7fec236
commit 382b5e3ee7

View File

@ -20,6 +20,8 @@ type
protected protected
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy; procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override; const AXProportion, AYProportion: Double); override;
procedure ChangeScale(Multiplier, Divider: Integer); override;
procedure FontChanged(Sender: TObject); override;
public public
IsSmallDevice: Boolean; IsSmallDevice: Boolean;
@ -206,6 +208,16 @@ begin
LayoutDialog; LayoutDialog;
end; end;
procedure TPromptDialog.ChangeScale(Multiplier, Divider: Integer);
begin
inherited ChangeScale(Multiplier, Divider);
TextBox.Left := MulDiv(TextBox.Left, Multiplier, Divider);
TextBox.Top := MulDiv(TextBox.Top, Multiplier, Divider);
TextBox.Right := MulDiv(TextBox.Right, Multiplier, Divider);
TextBox.Bottom := MulDiv(TextBox.Bottom, Multiplier, Divider);
end;
destructor TPromptDialog.Destroy; destructor TPromptDialog.Destroy;
begin begin
FBitmap.Free; FBitmap.Free;
@ -227,6 +239,13 @@ begin
end; end;
end; end;
procedure TPromptDialog.FontChanged(Sender: TObject);
begin
inherited FontChanged(Sender);
TextStyle.SystemFont := False;
end;
function TPromptDialog.GetMessageText: string; function TPromptDialog.GetMessageText: string;
begin begin
Result := MSG; Result := MSG;