Use FLPs so UI scale doesn't break Record Movie dialog (see #2605)

disables resizing the dialog; default is big enough and the `TextBox`es can
scroll
This commit is contained in:
YoshiRulz 2022-12-07 07:39:22 +10:00
parent 632f063073
commit a8e0192281
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 15 additions and 8 deletions

View File

@ -148,25 +148,32 @@ namespace BizHawk.Client.EmuHawk
AutoScaleMode = AutoScaleMode.Font;
CancelButton = Cancel;
ClientSize = new(478, 163);
FormBorderStyle = FormBorderStyle.FixedDialog;
Icon = Properties.Resources.TAStudioIcon;
MaximizeBox = false;
MaximumSize = new(1440, 201);
MinimizeBox = false;
MinimumSize = new(425, 201);
StartPosition = FormStartPosition.CenterParent;
Text = "Record Movie";
Controls.Add(groupBox1);
Controls.Add(OK);
Controls.Add(Cancel);
Controls.Add(new FlowLayoutPanel
{
Controls =
{
groupBox1,
new SingleRowFLP
{
Controls = { OK, Cancel },
},
},
FlowDirection = FlowDirection.RightToLeft, // going for two rows so the buttons are right-aligned
Margin = Padding.Empty,
Size = new(464, 144),
});
Load += RecordMovie_Load;
if (OSTailoredCode.IsUnixHost) Load += (_, _) =>
{
//HACK to make this usable on Linux. No clue why this Form in particular is so much worse, maybe the GroupBox? --yoshi
groupBox1.Height -= 24;
DefaultAuthorCheckBox.Location += new Size(0, 32);
var s = new Size(0, 40);
OK.Location += s;
Cancel.Location += s;
};
groupBox1.ResumeLayout(performLayout: false);