From 483fd3f128a0025dcae371e129b414e884a121b2 Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 26 May 2018 11:58:14 -0400 Subject: [PATCH] UI: Fixed issues with palette color selection (video config & ppu viewer) when DPI is not set to 100% --- GUI.NET/Debugger/ctrlPaletteDisplay.cs | 4 ++-- GUI.NET/Debugger/frmSelectColor.Designer.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GUI.NET/Debugger/ctrlPaletteDisplay.cs b/GUI.NET/Debugger/ctrlPaletteDisplay.cs index d9056bb7..e64ff7e0 100644 --- a/GUI.NET/Debugger/ctrlPaletteDisplay.cs +++ b/GUI.NET/Debugger/ctrlPaletteDisplay.cs @@ -100,8 +100,8 @@ namespace Mesen.GUI.Debugger private void picPalette_MouseDown(object sender, MouseEventArgs e) { - float xPos = (float)e.X / picPalette.Image.Width; - float yPos = (float)e.Y / picPalette.Image.Height; + float xPos = (float)e.X / picPalette.Width; + float yPos = (float)e.Y / picPalette.Height; float y = yPos < 0.5 ? yPos : (yPos - 0.5f); float x = yPos < 0.5 ? xPos : (xPos + 1); diff --git a/GUI.NET/Debugger/frmSelectColor.Designer.cs b/GUI.NET/Debugger/frmSelectColor.Designer.cs index 80f1c0d2..33cf9d78 100644 --- a/GUI.NET/Debugger/frmSelectColor.Designer.cs +++ b/GUI.NET/Debugger/frmSelectColor.Designer.cs @@ -74,6 +74,9 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(350, 363); this.Controls.Add(this.tableLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "frmSelectColor"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Select Color...";