From 1f232e6875f4ea535208d090444fac5b730fc900 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Wed, 5 Jan 2022 15:54:59 +0100 Subject: [PATCH] Fix progressbar todo --- AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs index 3c45d20..9e5670c 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs @@ -234,7 +234,7 @@ namespace AM2RLauncher Icon = new Icon(1f, am2rIcon); Title = "AM2RLauncher " + VERSION + ": " + splash; MinimumSize = new Size(500, 400); - // TODO: for some reason, this sometimes doesn't work on Linux. Eto bug maybe? + // TODO: for some reason, this sometimes doesn't work on Linux. Was reported at eto, stays here until its fixed ClientSize = new Size(int.Parse(CrossPlatformOperations.ReadFromConfig("Width")), int.Parse(CrossPlatformOperations.ReadFromConfig("Height"))); if (ClientSize.Width < 500) ClientSize = new Size(500, ClientSize.Height); @@ -290,15 +290,10 @@ namespace AM2RLauncher centerInterface.AddRow(apkButton); - progressBar = new ProgressBar(); - - // The ProgressBar class is DUMB. - // For some reason, height/visibility do not take effect when done through the manual constructor, so we do it on LoadComplete instead. - //TODO: seems like it was fixed? - progressBar.LoadComplete += (sender, e) => + progressBar = new ProgressBar { - progressBar.Visible = false; - progressBar.Height = 15; + Visible = false, + Height = 15 }; // 4px spacer between APK button and progressBar (Windows only)