Misc tweaks

Un-fix main panel, guess this might help for scaling the GUI via OS settings. Add an overload to rescale ItemSize for the vertical tab control; don't think it is ever called though.

Make EvoChain get method public for archit
This commit is contained in:
Kurt 2023-01-28 19:23:43 -08:00
parent 15925b1368
commit 93c4abbbd5
4 changed files with 9 additions and 5 deletions

View File

@ -7,7 +7,7 @@ namespace PKHeX.Core;
/// <summary>
/// Logic to create an <see cref="EvolutionHistory"/>.
/// </summary>
internal static class EvolutionChain
public static class EvolutionChain
{
public static EvolutionHistory GetEvolutionChainsAllGens(PKM pk, IEncounterTemplate enc)
{

View File

@ -153,7 +153,7 @@ private static IReadOnlyList<ushort> GetSuggestedRelearnEgg(this IEncounterTempl
// Try again with the other split-breed species if possible.
var generator = EncounterGenerator.GetGenerator(enc.Version);
var tree = EvolutionTree.GetEvolutionTree(enc.Context);
var chain = tree.GetValidPreEvolutions(pk, 100, skipChecks: true);
var chain = tree.GetValidPreEvolutions(pk, 100, skipChecks: true, stopSpecies: enc.Species);
var other = generator.GetPossible(pk, chain, enc.Version, EncounterTypeGroup.Egg);
foreach (var incense in other)
{

View File

@ -39,6 +39,12 @@ protected override void OnDrawItem(DrawItemEventArgs e)
graphics.DrawString(tab.Text, Font, text, bounds, flags);
base.OnDrawItem(e);
}
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
{
base.ScaleControl(factor, specified);
ItemSize = new((int)(ItemSize.Height * factor.Height), (int)(ItemSize.Width * factor.Width));
}
}
public sealed class VerticalTabControlEntityEditor : VerticalTabControl

View File

@ -1,4 +1,4 @@
namespace PKHeX.WinForms
namespace PKHeX.WinForms
{
partial class Main
{
@ -391,8 +391,6 @@ public void InitializeComponent()
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(8);
this.splitContainer1.Name = "splitContainer1";