Put colors into seperate class

pull/35/head
Miepee 4 years ago
parent d376629faf
commit 5b520f3cbd

@ -0,0 +1,23 @@
using AM2RLauncherLib;
using Eto.Drawing;
namespace AM2RLauncher;
public static class LauncherColors
{
// Colors
/// <summary>The main green color.</summary>
public static readonly Color Green = Color.FromArgb(142, 188, 35);
/// <summary>The warning red color.</summary>
public static readonly Color Red = Color.FromArgb(188, 10, 35);
/// <summary>The main inactive color.</summary>
public static readonly Color Inactive = Color.FromArgb(109, 109, 109);
/// <summary>The black background color without alpha value.</summary>
public static readonly Color BGNoAlpha = Color.FromArgb(10, 10, 10);
/// <summary>The black background color.</summary>
// XORG can't display alpha anyway, and Wayland breaks with it.
// TODO: that sounds like an Eto issue. investigate, try to open eto issue.
public static readonly Color BG = OS.IsLinux ? Color.FromArgb(10, 10, 10) : Color.FromArgb(10, 10, 10, 80);
/// <summary>The lighter green color on hover.</summary>
public static readonly Color BGHover = Color.FromArgb(17, 28, 13);
}

@ -41,13 +41,13 @@ public partial class MainForm : Form
// Safety check // Safety check
if ((modSettingsProfileDropDown == null) || (modSettingsProfileDropDown.Items.Count != 0)) return; if ((modSettingsProfileDropDown == null) || (modSettingsProfileDropDown.Items.Count != 0)) return;
addModButton.Enabled = false; addModButton.Enabled = false;
settingsProfileLabel.TextColor = colorInactive; settingsProfileLabel.TextColor = LauncherColors.Inactive;
modSettingsProfileDropDown.Enabled = false; modSettingsProfileDropDown.Enabled = false;
profileButton.Enabled = false; profileButton.Enabled = false;
saveButton.Enabled = false; saveButton.Enabled = false;
updateModButton.Enabled = false; updateModButton.Enabled = false;
deleteModButton.Enabled = false; deleteModButton.Enabled = false;
profileNotesTextArea.TextColor = colorInactive; profileNotesTextArea.TextColor = LauncherColors.Inactive;
} }
/// <summary> /// <summary>
@ -778,7 +778,7 @@ public partial class MainForm : Form
deleteModButton.ToolTip = null; deleteModButton.ToolTip = null;
updateModButton.Enabled = false; updateModButton.Enabled = false;
updateModButton.ToolTip = null; updateModButton.ToolTip = null;
profileNotesTextArea.TextColor = colorInactive; profileNotesTextArea.TextColor = LauncherColors.Inactive;
} }
else else
{ {
@ -795,7 +795,7 @@ public partial class MainForm : Form
profileButton.ToolTip = HelperMethods.GetText(Text.OpenProfileFolderToolTip, profileName); profileButton.ToolTip = HelperMethods.GetText(Text.OpenProfileFolderToolTip, profileName);
saveButton.Enabled = true; saveButton.Enabled = true;
saveButton.ToolTip = HelperMethods.GetText(Text.OpenSaveFolderToolTip, profileName); saveButton.ToolTip = HelperMethods.GetText(Text.OpenSaveFolderToolTip, profileName);
profileNotesTextArea.TextColor = colorGreen; profileNotesTextArea.TextColor = LauncherColors.Green;
profileNotesTextArea.Text = Text.ProfileNotes + "\n" + profileList[modSettingsProfileDropDown.SelectedIndex].ProfileNotes; profileNotesTextArea.Text = Text.ProfileNotes + "\n" + profileList[modSettingsProfileDropDown.SelectedIndex].ProfileNotes;
} }

@ -152,7 +152,7 @@ public partial class MainForm
} }
if (apkButtonState == ApkButtonState.Creating) profileDropDown.Enabled = false; if (apkButtonState == ApkButtonState.Creating) profileDropDown.Enabled = false;
Color col = profileDropDown.Enabled ? colorGreen : colorInactive; Color col = profileDropDown.Enabled ? LauncherColors.Green : LauncherColors.Inactive;
if (OS.IsWindows) if (OS.IsWindows)
profileDropDown.TextColor = col; profileDropDown.TextColor = col;
@ -185,7 +185,7 @@ public partial class MainForm
string selectedProfileName = modSettingsProfileDropDown.Items[modSettingsProfileDropDown.SelectedIndex].Text; string selectedProfileName = modSettingsProfileDropDown.Items[modSettingsProfileDropDown.SelectedIndex].Text;
settingsProfileLabel.TextColor = colorGreen; settingsProfileLabel.TextColor = LauncherColors.Green;
modSettingsProfileDropDown.Enabled = enabled; modSettingsProfileDropDown.Enabled = enabled;
desktopShortcutButton.Enabled = enabled; desktopShortcutButton.Enabled = enabled;
profileButton.Enabled = enabled; profileButton.Enabled = enabled;
@ -206,7 +206,7 @@ public partial class MainForm
Color col = enabled ? colorGreen : colorInactive; Color col = enabled ? LauncherColors.Green : LauncherColors.Inactive;
if (OS.IsWindows) if (OS.IsWindows)
modSettingsProfileDropDown.TextColor = col; modSettingsProfileDropDown.TextColor = col;
@ -400,7 +400,7 @@ public partial class MainForm
// Not sure why the dropdown menu needs this hack, but the textBox does not. // Not sure why the dropdown menu needs this hack, but the textBox does not.
//TODO: eto feature request //TODO: eto feature request
if (OS.IsWindows) if (OS.IsWindows)
mirrorDropDown.TextColor = mirrorDropDown.Enabled ? colorGreen : colorInactive; mirrorDropDown.TextColor = mirrorDropDown.Enabled ? LauncherColors.Green : LauncherColors.Inactive;
mirrorLabel.TextColor = !enabled ? colorGreen : colorInactive; mirrorLabel.TextColor = !enabled ? LauncherColors.Green : LauncherColors.Inactive;
} }
} }

@ -164,7 +164,7 @@ public partial class MainForm : Form
log.Info($"Start the launcher with Size: {ClientSize.Width}, {ClientSize.Height}"); log.Info($"Start the launcher with Size: {ClientSize.Width}, {ClientSize.Height}");
if (Boolean.Parse(ReadFromConfig("IsMaximized"))) Maximize(); if (Boolean.Parse(ReadFromConfig("IsMaximized"))) Maximize();
Drawable drawable = new Drawable { BackgroundColor = colorBGNoAlpha }; Drawable drawable = new Drawable { BackgroundColor = LauncherColors.BGNoAlpha };
// Drawable paint event // Drawable paint event
drawable.Paint += DrawablePaintEvent; drawable.Paint += DrawablePaintEvent;
@ -180,21 +180,21 @@ public partial class MainForm : Form
// PLAY button // PLAY button
playButton = new ColorButton playButton = new ColorButton
{ {
BackgroundColorHover = colorBGHover, BackgroundColorHover = LauncherColors.BGHover,
Height = 40, Height = 40,
Width = 250, Width = 250,
TextColor = colorGreen, TextColor = LauncherColors.Green,
TextColorDisabled = colorInactive, TextColorDisabled = LauncherColors.Inactive,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
FrameColorDisabled = colorInactive FrameColorDisabled = LauncherColors.Inactive
}; };
centerInterface.AddRow(playButton); centerInterface.AddRow(playButton);
//TODO: consider making the spacers global? //TODO: consider making the spacers global?
// 2px spacer between playButton and apkButton (Windows only) // 2px spacer between playButton and apkButton (Windows only)
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = colorBG, Height = 2 }); if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 2 });
// APK button // APK button
apkButton = new ColorButton apkButton = new ColorButton
@ -202,10 +202,10 @@ public partial class MainForm : Form
Text = Text.CreateAPK, Text = Text.CreateAPK,
Height = 40, Height = 40,
Width = 250, Width = 250,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
centerInterface.AddRow(apkButton); centerInterface.AddRow(apkButton);
@ -217,30 +217,30 @@ public partial class MainForm : Form
}; };
// 4px spacer between APK button and progressBar (Windows only) // 4px spacer between APK button and progressBar (Windows only)
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = colorBG, Height = 4 }); if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 4 });
centerInterface.AddRow(progressBar); centerInterface.AddRow(progressBar);
progressLabel = new Label progressLabel = new Label
{ {
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
Height = 15, Height = 15,
Text = "", Text = "",
TextColor = colorGreen, TextColor = LauncherColors.Green,
Visible = false Visible = false
}; };
centerInterface.AddRow(progressLabel); centerInterface.AddRow(progressLabel);
// 3px spacer between progressBar and profile label (Windows only) // 3px spacer between progressBar and profile label (Windows only)
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = colorBG, Height = 3 }); if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 3 });
profileLabel = new Label profileLabel = new Label
{ {
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
Height = 15, Height = 15,
Text = Text.CurrentProfile, Text = Text.CurrentProfile,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
centerInterface.AddRow(profileLabel); centerInterface.AddRow(profileLabel);
@ -252,8 +252,8 @@ public partial class MainForm : Form
// Mac gets a default BackgroundColor because it looks waaaaaaay better. // Mac gets a default BackgroundColor because it looks waaaaaaay better.
profileDropDown = new DropDown profileDropDown = new DropDown
{ {
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = OS.IsWindows ? colorBGNoAlpha : new Color() BackgroundColor = OS.IsWindows ? LauncherColors.BGNoAlpha : new Color()
}; };
// In order to not have conflicting theming, we just always respect the users theme for dropdown on GTK. // In order to not have conflicting theming, we just always respect the users theme for dropdown on GTK.
if (OS.IsLinux) if (OS.IsLinux)
@ -266,18 +266,18 @@ public partial class MainForm : Form
// Profiles label // Profiles label
profileAuthorLabel = new Label profileAuthorLabel = new Label
{ {
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
Height = 16, Height = 16,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
centerInterface.AddRow(profileAuthorLabel); centerInterface.AddRow(profileAuthorLabel);
profileVersionLabel = new Label profileVersionLabel = new Label
{ {
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
Height = 16, Height = 16,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
centerInterface.AddRow(profileVersionLabel); centerInterface.AddRow(profileVersionLabel);
@ -285,11 +285,11 @@ public partial class MainForm : Form
saveWarningLabel = new Label saveWarningLabel = new Label
{ {
Visible = false, Visible = false,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
Width = 20, Width = 20,
Height = 55, Height = 55,
Text = Text.SaveLocationWarning, Text = Text.SaveLocationWarning,
TextColor = colorRed TextColor = LauncherColors.Red
}; };
centerInterface.AddRow(saveWarningLabel); centerInterface.AddRow(saveWarningLabel);
@ -333,7 +333,7 @@ public partial class MainForm : Form
Label versionLabel = new Label Label versionLabel = new Label
{ {
Text = $"v{VERSION}{(isThisRunningFromWine ? "-WINE" : "")}", Text = $"v{VERSION}{(isThisRunningFromWine ? "-WINE" : "")}",
Width = 48, TextAlignment = TextAlignment.Right, TextColor = colorGreen, Width = 48, TextAlignment = TextAlignment.Right, TextColor = LauncherColors.Green,
Font = new Font(SystemFont.Default, 12) Font = new Font(SystemFont.Default, 12)
}; };
@ -348,7 +348,7 @@ public partial class MainForm : Form
mainLayout.AddSpace(); mainLayout.AddSpace();
// Yes, I'm hard-coding this string. Linux users can english. // Yes, I'm hard-coding this string. Linux users can english.
mainLayout.AddColumn(versionLabel, isThisRunningFromWine ? new Label { Text = "Unsupported", TextColor = colorRed, TextAlignment = TextAlignment.Right } : null); mainLayout.AddColumn(versionLabel, isThisRunningFromWine ? new Label { Text = "Unsupported", TextColor = LauncherColors.Red, TextAlignment = TextAlignment.Right } : null);
drawable.Content = mainLayout; drawable.Content = mainLayout;
@ -360,7 +360,7 @@ public partial class MainForm : Form
// [MAIN PAGE] // [MAIN PAGE]
TabPage mainPage = new TabPage TabPage mainPage = new TabPage
{ {
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
Text = Text.PlayTab, Text = Text.PlayTab,
Content = drawable Content = drawable
}; };
@ -377,13 +377,13 @@ public partial class MainForm : Form
Label changelogNoConnectionLabel = new Label Label changelogNoConnectionLabel = new Label
{ {
Text = Text.NoInternetConnection, Text = Text.NoInternetConnection,
TextColor = colorGreen, TextColor = LauncherColors.Green,
TextAlignment = TextAlignment.Center TextAlignment = TextAlignment.Center
}; };
TabPage changelogPage = new TabPage TabPage changelogPage = new TabPage
{ {
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
Text = Text.ChangelogTab, Text = Text.ChangelogTab,
Content = new TableLayout Content = new TableLayout
@ -410,14 +410,14 @@ public partial class MainForm : Form
Label newsNoConnectionLabel = new Label Label newsNoConnectionLabel = new Label
{ {
Text = Text.NoInternetConnection, Text = Text.NoInternetConnection,
TextColor = colorGreen, TextColor = LauncherColors.Green,
TextAlignment = TextAlignment.Center TextAlignment = TextAlignment.Center
}; };
TabPage newsPage = new TabPage TabPage newsPage = new TabPage
{ {
Text = Text.NewsTab, Text = Text.NewsTab,
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
Content = new TableLayout Content = new TableLayout
{ {
@ -462,7 +462,7 @@ public partial class MainForm : Form
Label languageLabel = new Label Label languageLabel = new Label
{ {
Text = Text.LanguageNotice, Text = Text.LanguageNotice,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
// Language DropDown menu // Language DropDown menu
@ -483,8 +483,8 @@ public partial class MainForm : Form
languageDropDown = new DropDown languageDropDown = new DropDown
{ {
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = OS.IsWindows ? colorBGNoAlpha : new Color() BackgroundColor = OS.IsWindows ? LauncherColors.BGNoAlpha : new Color()
}; };
if (OS.IsLinux) if (OS.IsLinux)
languageDropDown = new DropDown(); languageDropDown = new DropDown();
@ -508,7 +508,7 @@ public partial class MainForm : Form
{ {
Checked = Boolean.Parse(ReadFromConfig("AutoUpdateAM2R")), Checked = Boolean.Parse(ReadFromConfig("AutoUpdateAM2R")),
Text = Text.AutoUpdateAM2R, Text = Text.AutoUpdateAM2R,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
// autoUpdateLauncher checkbox // autoUpdateLauncher checkbox
@ -516,7 +516,7 @@ public partial class MainForm : Form
{ {
Checked = Boolean.Parse(ReadFromConfig("AutoUpdateLauncher")), Checked = Boolean.Parse(ReadFromConfig("AutoUpdateLauncher")),
Text = Text.AutoUpdateLauncher, Text = Text.AutoUpdateLauncher,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
// HQ music, PC // HQ music, PC
@ -524,7 +524,7 @@ public partial class MainForm : Form
{ {
Checked = Boolean.Parse(ReadFromConfig("MusicHQPC")), Checked = Boolean.Parse(ReadFromConfig("MusicHQPC")),
Text = Text.HighQualityPC, Text = Text.HighQualityPC,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
// HQ music, Android // HQ music, Android
@ -532,7 +532,7 @@ public partial class MainForm : Form
{ {
Checked = Boolean.Parse(ReadFromConfig("MusicHQAndroid")), Checked = Boolean.Parse(ReadFromConfig("MusicHQAndroid")),
Text = Text.HighQualityAndroid, Text = Text.HighQualityAndroid,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
// Create game debug logs // Create game debug logs
@ -540,20 +540,20 @@ public partial class MainForm : Form
{ {
Checked = Boolean.Parse(ReadFromConfig("ProfileDebugLog")), Checked = Boolean.Parse(ReadFromConfig("ProfileDebugLog")),
Text = Text.ProfileDebugCheckBox, Text = Text.ProfileDebugCheckBox,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
// Mirror list // Mirror list
mirrorLabel = new Label mirrorLabel = new Label
{ {
Text = Text.DownloadSource, Text = Text.DownloadSource,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
mirrorDropDown = new DropDown mirrorDropDown = new DropDown
{ {
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = OS.IsWindows ? colorBGNoAlpha : new Color() BackgroundColor = OS.IsWindows ? LauncherColors.BGNoAlpha : new Color()
}; };
if (OS.IsLinux) if (OS.IsLinux)
mirrorDropDown = new DropDown(); mirrorDropDown = new DropDown();
@ -570,14 +570,14 @@ public partial class MainForm : Form
{ {
Checked = Boolean.Parse(ReadFromConfig("CustomMirrorEnabled")), Checked = Boolean.Parse(ReadFromConfig("CustomMirrorEnabled")),
Text = Text.CustomMirrorCheck, Text = Text.CustomMirrorCheck,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
customMirrorTextBox = new TextBox customMirrorTextBox = new TextBox
{ {
Text = ReadFromConfig("CustomMirrorText"), Text = ReadFromConfig("CustomMirrorText"),
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
TextColor = colorGreen TextColor = LauncherColors.Green
}; };
EnableMirrorControlsAccordingly(); EnableMirrorControlsAccordingly();
@ -608,7 +608,7 @@ public partial class MainForm : Form
TabPage settingsPage = new TabPage TabPage settingsPage = new TabPage
{ {
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
Content = settingsLayout, Content = settingsLayout,
Text = Text.LauncherSettingsTab Text = Text.LauncherSettingsTab
}; };
@ -626,10 +626,10 @@ public partial class MainForm : Form
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 30,
Width = 275, Width = 275,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
Label modSpacer = new Label Label modSpacer = new Label
@ -640,14 +640,14 @@ public partial class MainForm : Form
settingsProfileLabel = new Label settingsProfileLabel = new Label
{ {
Text = Text.CurrentProfile, Text = Text.CurrentProfile,
TextColor = colorGreen, TextColor = LauncherColors.Green,
Width = 275 Width = 275
}; };
modSettingsProfileDropDown = new DropDown modSettingsProfileDropDown = new DropDown
{ {
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = OS.IsWindows ? colorBGNoAlpha : new Color() BackgroundColor = OS.IsWindows ? LauncherColors.BGNoAlpha : new Color()
}; };
// In order to not have conflicting theming, we just always respect the users theme for dropdown on GTK. // In order to not have conflicting theming, we just always respect the users theme for dropdown on GTK.
@ -664,10 +664,10 @@ public partial class MainForm : Form
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 30,
Width = 275, Width = 275,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
profileButton = new ColorButton profileButton = new ColorButton
@ -676,10 +676,10 @@ public partial class MainForm : Form
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 30,
Width = 275, Width = 275,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
saveButton = new ColorButton saveButton = new ColorButton
@ -688,10 +688,10 @@ public partial class MainForm : Form
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 30,
Width = 275, Width = 275,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
updateModButton = new ColorButton updateModButton = new ColorButton
@ -700,10 +700,10 @@ public partial class MainForm : Form
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 30,
Width = 275, Width = 275,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
deleteModButton = new ColorButton deleteModButton = new ColorButton
@ -712,17 +712,17 @@ public partial class MainForm : Form
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 30,
Width = 275, Width = 275,
TextColor = colorGreen, TextColor = LauncherColors.Green,
BackgroundColor = colorBG, BackgroundColor = LauncherColors.BG,
FrameColor = colorGreen, FrameColor = LauncherColors.Green,
BackgroundColorHover = colorBGHover BackgroundColorHover = LauncherColors.BGHover
}; };
profileNotesTextArea = new TextArea profileNotesTextArea = new TextArea
{ {
ReadOnly = true, ReadOnly = true,
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
TextColor = colorInactive, TextColor = LauncherColors.Inactive,
SpellCheck = false, SpellCheck = false,
Width = 275, Width = 275,
Height = 150 Height = 150
@ -735,7 +735,7 @@ public partial class MainForm : Form
TabPage modSettingsPage = new TabPage TabPage modSettingsPage = new TabPage
{ {
BackgroundColor = colorBGNoAlpha, BackgroundColor = LauncherColors.BGNoAlpha,
Content = modSettingsLayout, Content = modSettingsLayout,
Text = Text.ModSettingsTab Text = Text.ModSettingsTab
}; };
@ -812,23 +812,7 @@ public partial class MainForm : Form
/// <summary>The planet Background.</summary> /// <summary>The planet Background.</summary>
private readonly Bitmap formBG = new Bitmap(Resources.bgCentered); private readonly Bitmap formBG = new Bitmap(Resources.bgCentered);
// Colors
/// <summary>The main green color.</summary>
private readonly Color colorGreen = Color.FromArgb(142, 188, 35);
/// <summary>The warning red color.</summary>
private readonly Color colorRed = Color.FromArgb(188, 10, 35);
/// <summary>The main inactive color.</summary>
private readonly Color colorInactive = Color.FromArgb(109, 109, 109);
/// <summary>The black background color without alpha value.</summary>
private readonly Color colorBGNoAlpha = Color.FromArgb(10, 10, 10);
/// <summary>The black background color.</summary>
// XORG can't display alpha anyway, and Wayland breaks with it.
// TODO: that sounds like an Eto issue. investigate, try to open eto issue.
private readonly Color colorBG = OS.IsLinux ? Color.FromArgb(10, 10, 10) : Color.FromArgb(10, 10, 10, 80);
/// <summary>The lighter green color on hover.</summary>
private readonly Color colorBGHover = Color.FromArgb(17, 28, 13);
// Mirror lists // Mirror lists
/// <summary><see cref="List{String}"/> of mirror <see cref="string"/>s, used for actually working with mirrors.</summary> /// <summary><see cref="List{String}"/> of mirror <see cref="string"/>s, used for actually working with mirrors.</summary>
private readonly List<string> mirrorList; private readonly List<string> mirrorList;

Loading…
Cancel
Save