Skip to content

Commit

Permalink
Fix Mnemonic
Browse files Browse the repository at this point in the history
  • Loading branch information
CreateAndInject committed Dec 17, 2024
1 parent 51aac5f commit b32f026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ILSpy/Controls/CustomDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public CustomDialog(string caption, string message, int acceptButton, int cancel

using (Graphics g = this.CreateGraphics())
{
SizeF size = TextRenderer.MeasureText(message, label.Font);
Size clientSize = new Size((int)(size.Width * 96 / g.DpiX) + DockPadding.Left + DockPadding.Right, (int)(size.Height * 96 / g.DpiY) + DockPadding.Top + DockPadding.Bottom);
SizeF size = TextRenderer.MeasureText(message, label.Font, default, TextFormatFlags.NoPrefix);
Size clientSize = new Size((int)Math.Ceiling(size.Width * 96 / g.DpiX) + DockPadding.Left + DockPadding.Right, (int)Math.Ceiling(size.Height * 96 / g.DpiY) + DockPadding.Top + DockPadding.Bottom);
Button[] buttons = new Button[buttonLabels.Length];
int[] positions = new int[buttonLabels.Length];
int pos = 0;
Expand Down Expand Up @@ -86,7 +86,7 @@ public CustomDialog(string caption, string message, int acceptButton, int cancel
{
clientSize.Width = pos;
}
clientSize.Height += panel.Height + 6;
clientSize.Height += panel.Height;
this.ClientSize = clientSize;
int start = (clientSize.Width - pos) / 2;
for (int i = 0; i < buttons.Length; i++)
Expand Down

0 comments on commit b32f026

Please sign in to comment.