Browse Source

Merge pull request #3350 from CreateAndInject/FixMnemonic

Fix Mnemonic
pull/3356/head
Siegfried Pammer 1 year ago committed by GitHub
parent
commit
a9b2ade689
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      ILSpy/Controls/CustomDialog.cs

6
ILSpy/Controls/CustomDialog.cs

@ -51,8 +51,8 @@ namespace ICSharpCode.ILSpy.Controls
using (Graphics g = this.CreateGraphics()) using (Graphics g = this.CreateGraphics())
{ {
SizeF size = TextRenderer.MeasureText(message, label.Font); SizeF size = TextRenderer.MeasureText(message, label.Font, default, TextFormatFlags.NoPrefix);
Size clientSize = new Size((int)(size.Width * 96 / g.DpiX) + DockPadding.Left + DockPadding.Right, (int)(size.Height * 96 / g.DpiY) + DockPadding.Top + DockPadding.Bottom); 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]; Button[] buttons = new Button[buttonLabels.Length];
int[] positions = new int[buttonLabels.Length]; int[] positions = new int[buttonLabels.Length];
int pos = 0; int pos = 0;
@ -86,7 +86,7 @@ namespace ICSharpCode.ILSpy.Controls
{ {
clientSize.Width = pos; clientSize.Width = pos;
} }
clientSize.Height += panel.Height + 6; clientSize.Height += panel.Height;
this.ClientSize = clientSize; this.ClientSize = clientSize;
int start = (clientSize.Width - pos) / 2; int start = (clientSize.Width - pos) / 2;
for (int i = 0; i < buttons.Length; i++) for (int i = 0; i < buttons.Length; i++)

Loading…
Cancel
Save