create seperate class for spacer

pull/35/head
Miepee 4 years ago
parent 98fa95b900
commit 52bbf0b408

@ -0,0 +1,11 @@
using Eto.Forms;
namespace AM2RLauncher;
public class Spacer : Label
{
public Spacer(int height)
{
Height = height;
}
}

@ -180,9 +180,9 @@ public partial class MainForm : Form
centerInterface.AddRow(playButton); centerInterface.AddRow(playButton);
//TODO: consider making the spacers global? // TODO: consider unifying most spacers to the same unit?
// 2px spacer between playButton and apkButton (Windows only) // 2px spacer between playButton and apkButton
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 2 }); centerInterface.AddRow(new Spacer(2));
// APK button // APK button
apkButton = new BigColorButton(Text.CreateAPK); apkButton = new BigColorButton(Text.CreateAPK);
@ -195,8 +195,8 @@ public partial class MainForm : Form
Height = 15 Height = 15
}; };
// 4px spacer between APK button and progressBar (Windows only) // 4px spacer between APK button and progressBar
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 4 }); centerInterface.AddRow(new Spacer(4));
centerInterface.AddRow(progressBar); centerInterface.AddRow(progressBar);
@ -211,8 +211,8 @@ public partial class MainForm : Form
centerInterface.AddRow(progressLabel); centerInterface.AddRow(progressLabel);
// 3px spacer between progressBar and profile label (Windows only) // 3px spacer between progressBar and profile label
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 3 }); centerInterface.AddRow(new Spacer(3));
profileLabel = new Label profileLabel = new Label
{ {
@ -601,10 +601,7 @@ public partial class MainForm : Form
addModButton = new SmallColorButton(Text.AddNewMod); addModButton = new SmallColorButton(Text.AddNewMod);
Label modSpacer = new Label Label modSpacer = new Spacer(14);
{
Height = 14
};
settingsProfileLabel = new Label settingsProfileLabel = new Label
{ {

Loading…
Cancel
Save