Skip to content

Commit

Permalink
chore: small color changes
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Feb 26, 2022
1 parent 8033f02 commit ab62340
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/XIVLauncher/App.xaml.cs
Expand Up @@ -38,6 +38,14 @@ public partial class App : Application

public static bool GlobalIsDisableAutologin { get; private set; }


public static Brush UaBrush = new LinearGradientBrush(new GradientStopCollection()
{
new(Color.FromArgb(0xFF, 0x27, 0x3F, 0xC3), 0.5f),
new(Color.FromArgb(0xFF, 0xe6, 0xde, 0x12), 0.5f),
}, 0.7f);


public App()
{
// wine does not support WPF with HW rendering, so switch to software only mode
Expand Down Expand Up @@ -321,6 +329,20 @@ private void App_OnStartup(object sender, StartupEventArgs e)

Log.Verbose("Loading MainWindow for account '{0}'", accountName);

if (App.Settings.LauncherLanguage == LauncherLanguage.Russian)
{
var dict = new ResourceDictionary
{
{"PrimaryHueLightBrush", UaBrush},
//{"PrimaryHueLightForegroundBrush", uaBrush},
{"PrimaryHueMidBrush", UaBrush},
//{"PrimaryHueMidForegroundBrush", uaBrush},
{"PrimaryHueDarkBrush", UaBrush},
//{"PrimaryHueDarkForegroundBrush", uaBrush},
};
this.Resources.MergedDictionaries.Add(dict);
}

if (EnvironmentSettings.IsDisableUpdates)
{
OnUpdateCheckFinished(true);
Expand Down
6 changes: 6 additions & 0 deletions src/XIVLauncher/Windows/MainWindow.xaml.cs
Expand Up @@ -147,6 +147,12 @@ public MainWindow()

if (EnvironmentSettings.IsWine)
Title += " - Wine on Linux";

if (App.Settings.LauncherLanguage == LauncherLanguage.Russian)
{
AccountSwitcherButton.Background = App.UaBrush;
AccountSwitcherButton.BorderBrush = App.UaBrush;
}
}

private async Task SetupHeadlines()
Expand Down

0 comments on commit ab62340

Please sign in to comment.