Changed: refactor

This commit is contained in:
Ray 2021-08-01 15:31:40 +01:00
parent 472dd3ba20
commit 928adf8f04
2 changed files with 5 additions and 6 deletions

View File

@ -686,14 +686,10 @@ namespace FizzyLauncher
private void tileContainer1_OnSizeChanged(object sender, EventArgs e)
{
int newWidth = TilePanelLayout.CalcWidth(tileContainer1.TileWidthCount);
newWidth += SystemInformation.VerticalScrollBarWidth;
newWidth += tileContainer1.CalcWidth;
newWidth += this.Padding.Horizontal;
int newWidth = this.Padding.Horizontal + SystemInformation.VerticalScrollBarWidth + tileContainer1.CalcWidth;
ThreadControl.SetClientWidth(this, newWidth);
}
}
}

View File

@ -47,7 +47,10 @@ namespace FizzyLauncher.Windows.Forms
public int CalcWidth
{
get => flowLayoutPanel1.Padding.Horizontal + flowLayoutPanel1.Margin.Horizontal + this.Left + this.Padding.Horizontal + this.Margin.Horizontal;
get =>
TilePanelLayout.CalcWidth(this.TileWidthCount) +
this.Left + this.Padding.Horizontal + this.Margin.Horizontal +
flowLayoutPanel1.Padding.Horizontal + flowLayoutPanel1.Margin.Horizontal;
}
public int GroupCount