diff --git a/PKHeX.WinForms/Controls/PKM Editor/DrawConfig.cs b/PKHeX.WinForms/Controls/PKM Editor/DrawConfig.cs index 895b8d312..21a8422bf 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/DrawConfig.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/DrawConfig.cs @@ -18,55 +18,55 @@ public sealed class DrawConfig : IDisposable private const string Moves = "Moves"; private const string Hovering = "Hovering"; - [Category(Hovering), Description("Hovering over a PKM color 1.")] + [Category(Hovering), LocalizedDescription("Hovering over a PKM color 1.")] public Color GlowInitial { get; set; } = Color.White; - [Category(Hovering), Description("Hovering over a PKM color 2.")] + [Category(Hovering), LocalizedDescription("Hovering over a PKM color 2.")] public Color GlowFinal { get; set; } = Color.LightSkyBlue; #region PKM - [Category(PKM), Description("Background color of a ComboBox when the selected item is not valid.")] + [Category(PKM), LocalizedDescription("Background color of a ComboBox when the selected item is not valid.")] public Color InvalidSelection { get; set; } = Color.DarkSalmon; - [Category(PKM), Description("Default colored marking.")] + [Category(PKM), LocalizedDescription("Default colored marking.")] public Color MarkDefault { get; set; } = Color.Black; - [Category(PKM), Description("Blue colored marking.")] + [Category(PKM), LocalizedDescription("Blue colored marking.")] public Color MarkBlue { get; set; } = Color.FromArgb(000, 191, 255); - [Category(PKM), Description("Pink colored marking.")] + [Category(PKM), LocalizedDescription("Pink colored marking.")] public Color MarkPink { get; set; } = Color.FromArgb(255, 117, 179); - [Category(PKM), Description("Male gender color.")] + [Category(PKM), LocalizedDescription("Male gender color.")] public Color Male { get; set; } = Color.Blue; - [Category(PKM), Description("Female gender color.")] + [Category(PKM), LocalizedDescription("Female gender color.")] public Color Female { get; set; } = Color.Red; - [Category(PKM), Description("Shiny star when using unicode characters.")] + [Category(PKM), LocalizedDescription("Shiny star when using unicode characters.")] public string ShinyUnicode { get; set; } = "☆"; - [Category(PKM), Description("Shiny star when not using unicode characters.")] + [Category(PKM), LocalizedDescription("Shiny star when not using unicode characters.")] public string ShinyDefault { get; set; } = "*"; #endregion #region Moves - [Category(Moves), Description("Legal move choice background color.")] + [Category(Moves), LocalizedDescription("Legal move choice background color.")] public Color BackLegal { get; set; } = Color.FromArgb(200, 255, 200); - [Category(Moves), Description("Legal move choice text color.")] + [Category(Moves), LocalizedDescription("Legal move choice text color.")] public Color TextColor { get; set; } = SystemColors.WindowText; - [Category(Moves), Description("Illegal Legal move choice background color.")] + [Category(Moves), LocalizedDescription("Illegal Legal move choice background color.")] public Color BackColor { get; set; } = SystemColors.Window; - [Category(Moves), Description("Highlighted move choice background color.")] + [Category(Moves), LocalizedDescription("Highlighted move choice background color.")] public Color BackHighlighted { get; set; } = SystemColors.Highlight; - [Category(Moves), Description("Highlighted move choice text color.")] + [Category(Moves), LocalizedDescription("Highlighted move choice text color.")] public Color TextHighlighted { get; set; } = SystemColors.HighlightText; #endregion diff --git a/PKHeX.WinForms/Controls/PKM Editor/GenderToggle.cs b/PKHeX.WinForms/Controls/PKM Editor/GenderToggle.cs index d53aef9e6..6d5332aa0 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/GenderToggle.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/GenderToggle.cs @@ -12,6 +12,7 @@ public partial class GenderToggle : UserControl, IGenderToggle private int Value = -1; // Initial load will trigger gender to appear (-1 => 0) private string? InitialAccessible; + public static int FocusBorderDeflate { get; set; } public int Gender { @@ -47,7 +48,7 @@ protected override void OnPaint(PaintEventArgs pe) if (!Focused) return; var rc = ClientRectangle; - rc.Inflate(-2, -2); + rc.Inflate(-FocusBorderDeflate, -FocusBorderDeflate); ControlPaint.DrawFocusRectangle(pe.Graphics, rc); } diff --git a/PKHeX.WinForms/Controls/PKM Editor/SelectablePictureBox.cs b/PKHeX.WinForms/Controls/PKM Editor/SelectablePictureBox.cs index 6b1f6f244..b312d6826 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/SelectablePictureBox.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/SelectablePictureBox.cs @@ -8,6 +8,8 @@ public class SelectablePictureBox : PictureBox { public SelectablePictureBox() => SetStyle(ControlStyles.Selectable, TabStop = true); + public static int FocusBorderDeflate { get; set; } + protected override void OnMouseDown(MouseEventArgs e) { Focus(); @@ -31,7 +33,7 @@ protected override void OnPaint(PaintEventArgs pe) if (!Focused) return; var rc = ClientRectangle; - rc.Inflate(-2, -2); + rc.Inflate(-FocusBorderDeflate, -FocusBorderDeflate); ControlPaint.DrawFocusRectangle(pe.Graphics, rc); } } diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs index 69542fd68..5831b3558 100644 --- a/PKHeX.WinForms/MainWindow/Main.cs +++ b/PKHeX.WinForms/MainWindow/Main.cs @@ -419,6 +419,7 @@ private void ReloadProgramSettings(PKHeXSettings settings) EntityConverter.AllowIncompatibleConversion = settings.Advanced.AllowIncompatibleConversion; EntityConverter.RejuvenateHOME = settings.Advanced.AllowGuessRejuvenateHOME; WinFormsUtil.DetectSaveFileOnFileOpen = settings.Startup.TryDetectRecentSave; + SelectablePictureBox.FocusBorderDeflate = GenderToggle.FocusBorderDeflate = settings.Display.FocusBorderDeflate; SpriteBuilder.LoadSettings(settings.Sprite); } diff --git a/PKHeX.WinForms/Properties/PKHeXSettings.cs b/PKHeX.WinForms/Properties/PKHeXSettings.cs index 6ce9a7c4a..f8d8e5da1 100644 --- a/PKHeX.WinForms/Properties/PKHeXSettings.cs +++ b/PKHeX.WinForms/Properties/PKHeXSettings.cs @@ -369,6 +369,9 @@ public sealed class DisplaySettings [LocalizedDescription("Flag Illegal Slots in Save File")] public bool FlagIllegal { get; set; } = true; + + [LocalizedDescription("Focus border indentation for custom drawn image controls.")] + public int FocusBorderDeflate { get; set; } = 1; } [Serializable]