diff --git a/MainForm.cs b/MainForm.cs index ac8dee2..cffc521 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -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); } - } } \ No newline at end of file diff --git a/Windows/Forms/TileContainer.cs b/Windows/Forms/TileContainer.cs index 5976040..8a56e1b 100644 --- a/Windows/Forms/TileContainer.cs +++ b/Windows/Forms/TileContainer.cs @@ -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