mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 21:18:01 +02:00
lcl: InputQuery must query active monitor geometry instead of screen
git-svn-id: trunk@19972 -
This commit is contained in:
parent
de8215495d
commit
716ffb3fd9
@ -16,6 +16,18 @@
|
||||
|
||||
function ShowInputDialog(const InputCaption, InputPrompt : String;
|
||||
MaskInput : Boolean; var Value : String) : Boolean;
|
||||
|
||||
function ActiveMonitor: TMonitor; inline;
|
||||
begin
|
||||
if Screen.ActiveCustomForm <> nil then
|
||||
Result := Screen.ActiveCustomForm.Monitor
|
||||
else
|
||||
if Application.MainForm <> nil then
|
||||
Result := Application.MainForm.Monitor
|
||||
else
|
||||
Result := Screen.PrimaryMonitor;
|
||||
end;
|
||||
|
||||
var
|
||||
Form : TForm;
|
||||
Prompt : TLabel;
|
||||
@ -43,7 +55,7 @@ begin
|
||||
Parent := Form;
|
||||
Align := alTop;
|
||||
BorderSpacing.Top := 3;
|
||||
MinEditWidth := max(260, Screen.Width div 4);
|
||||
MinEditWidth := max(260, ActiveMonitor.Width div 4);
|
||||
Constraints.MinWidth := MinEditWidth;
|
||||
Text := Value;
|
||||
TabStop := True;
|
||||
|
Loading…
Reference in New Issue
Block a user