Fixed a problem where the flags selection form could be too small to accommodate the "OK" button when the game configuration contained too few flags

This commit is contained in:
biwa 2022-07-21 16:02:10 +02:00
parent 27ba367174
commit 39ec35984d
3 changed files with 16 additions and 16 deletions

View file

@ -37,14 +37,14 @@
//
// flags
//
this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flags.AutoScroll = true;
this.flags.Columns = 3;
this.flags.Location = new System.Drawing.Point(6, 19);
this.flags.Name = "flags";
this.flags.Size = new System.Drawing.Size(418, 195);
this.flags.Size = new System.Drawing.Size(175, 195);
this.flags.TabIndex = 0;
this.flags.VerticalSpacing = 1;
//
@ -52,7 +52,7 @@
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(351, 238);
this.cancel.Location = new System.Drawing.Point(108, 238);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(91, 25);
this.cancel.TabIndex = 4;
@ -63,7 +63,7 @@
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(254, 238);
this.apply.Location = new System.Drawing.Point(11, 238);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(91, 25);
this.apply.TabIndex = 3;
@ -73,13 +73,13 @@
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.flags);
this.groupBox1.Location = new System.Drawing.Point(12, 7);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(430, 225);
this.groupBox1.Size = new System.Drawing.Size(187, 225);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
//
@ -89,7 +89,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(454, 267);
this.ClientSize = new System.Drawing.Size(211, 267);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
@ -97,7 +97,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FlagsForm";
this.Opacity = 0;
this.Opacity = 0D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

View file

@ -52,8 +52,8 @@ namespace CodeImp.DoomBuilder.Windows
int newflagswidth = flags.GetWidth();
int newflagsheight = flags.GetHeight();
if(flagswidth != newflagswidth) this.Width += (newflagswidth - flagswidth);
if(flagsheight != newflagsheight) this.Height += (newflagsheight - flagsheight);
if(flagswidth < newflagswidth) this.Width += (newflagswidth - flagswidth);
if(flagsheight < newflagsheight) this.Height += (newflagsheight - flagsheight);
// Parse the value string and check the boxes if necessary
if(!string.IsNullOrEmpty(value.Trim()))

View file

@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>