浏览代码

settings window update

Veloe 2 年之前
父节点
当前提交
3364ac2c4b

+ 3 - 4
VeloeMinecraftLauncher/App.axaml

@@ -1,12 +1,11 @@
 <Application xmlns="https://github.com/avaloniaui"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+			 xmlns:dialog="clr-namespace:Egorozh.ColorPicker.Dialog;assembly=Egorozh.ColorPicker.Avalonia.Dialog"
              xmlns:local="using:VeloeMinecraftLauncher"
              x:Class="VeloeMinecraftLauncher.App">
     <Application.DataTemplates>
         <local:ViewLocator/>
     </Application.DataTemplates>
-
-    <Application.Styles>
-        <FluentTheme Mode="Dark"/>
-    </Application.Styles>
+	<Application.Styles>
+	</Application.Styles>
 </Application>

+ 16 - 0
VeloeMinecraftLauncher/App.axaml.cs

@@ -1,6 +1,8 @@
 using Avalonia;
 using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
+using Avalonia.Markup.Xaml.Styling;
+using Avalonia.Themes.Fluent;
 using VeloeMinecraftLauncher.ViewModels;
 using VeloeMinecraftLauncher.Views;
 
@@ -8,8 +10,22 @@ namespace VeloeMinecraftLauncher
 {
     public partial class App : Application
     {
+        public static FluentTheme FluentDark = new FluentTheme(new System.Uri("avares://ControlCatalog/Styles")) { Mode = FluentThemeMode.Dark };
+        public static FluentTheme FluentLight = new FluentTheme(new System.Uri("avares://ControlCatalog/Styles")) { Mode = FluentThemeMode.Light};
+        public static StyleInclude DataGridFluent = new StyleInclude(new System.Uri("avares://ControlCatalog/Styles"))
+        {
+            Source = new System.Uri("avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml")
+        };
+
+        public static Egorozh.ColorPicker.Dialog.FluentColorPickerTheme FluentColorPickerThemeLight = new Egorozh.ColorPicker.Dialog.FluentColorPickerTheme(new System.Uri("avares://ControlCatalog/Styles")) { Mode = FluentThemeMode.Light };
+        public static Egorozh.ColorPicker.Dialog.FluentColorPickerTheme FluentColorPickerThemeDark = new Egorozh.ColorPicker.Dialog.FluentColorPickerTheme(new System.Uri("avares://ControlCatalog/Styles")) { Mode = FluentThemeMode.Dark };
+
         public override void Initialize()
         {
+
+            Styles.Insert(0, FluentDark);            
+            Styles.Insert(1, DataGridFluent);
+            Styles.Insert(2, FluentColorPickerThemeDark);
             AvaloniaXamlLoader.Load(this);
         }
 

+ 38 - 1
VeloeMinecraftLauncher/MinecraftLauncher/Settings.cs

@@ -1,4 +1,5 @@
-using Microsoft.Extensions.Logging;
+using Avalonia.Media;
+using Microsoft.Extensions.Logging;
 using Serilog;
 using Serilog.Events;
 using System;
@@ -26,6 +27,12 @@ namespace VeloeMinecraftLauncher.MinecraftLauncher
         public static string lastChosenVersion;
         public static Serilog.ILogger logger;
         public static Serilog.ILogger avaloniaLogger;
+        public static Color backgroundColor = Color.Parse("Black");
+        public static float materialOpacity = 0.2F;
+        public static bool setMaxLog = false;
+        public static UInt32 MaxLog = 1024;
+        public static LogEventLevel consoleLogEventLevel = LogEventLevel.Debug;
+        public static LogEventLevel fileLogEventLevel = LogEventLevel.Debug;
 
         public static void UpdateSettings(SettingsSerializable settings)
         {
@@ -41,6 +48,13 @@ namespace VeloeMinecraftLauncher.MinecraftLauncher
             gameLogToLauncher = settings.gameLogToLauncher;
             lastChosenVersion = settings.lastChosenVersion;
             Username = settings.Username;
+            backgroundColor = Color.FromRgb(settings.R,settings.G,settings.B);
+            materialOpacity = settings.materialOpacity;
+            setMaxLog = settings.setMaxLog;
+            MaxLog = settings.MaxLog;
+            consoleLogEventLevel = settings.consoleLogEventLevel;
+            fileLogEventLevel = settings.fileLogEventLevel;
+
         }
 
         public static void LoadSettings()
@@ -99,6 +113,21 @@ namespace VeloeMinecraftLauncher.MinecraftLauncher
 
         public string lastChosenVersion { get; set; }
 
+        public byte _R;
+        public byte _G;
+        public byte _B;
+
+        public byte R { get => _R; set => _R = value; }
+        public byte G { get => _G; set => _G = value; }
+        public byte B { get => _B; set => _B = value; }
+
+        public float materialOpacity { get; set; }
+
+        public bool setMaxLog { get; set; }
+        public UInt32 MaxLog { get; set; }
+        public LogEventLevel consoleLogEventLevel { get; set; }
+        public LogEventLevel fileLogEventLevel { get; set; }
+
         public SettingsSerializable()
         {
             JavaPath = Settings.JavaPath;
@@ -111,6 +140,14 @@ namespace VeloeMinecraftLauncher.MinecraftLauncher
             gameLogToLauncher= Settings.gameLogToLauncher;
             Username = Settings.Username;
             lastChosenVersion= Settings.lastChosenVersion;
+            R = Settings.backgroundColor.R;
+            G = Settings.backgroundColor.G;
+            B = Settings.backgroundColor.B;
+            materialOpacity= Settings.materialOpacity;
+            setMaxLog= Settings.setMaxLog;
+            MaxLog = Settings.MaxLog;
+            consoleLogEventLevel= Settings.consoleLogEventLevel;
+            fileLogEventLevel= Settings.fileLogEventLevel;
         }
     }
 }

+ 3 - 1
VeloeMinecraftLauncher/Program.cs

@@ -20,10 +20,12 @@ namespace VeloeMinecraftLauncher
         // Avalonia configuration, don't remove; also used by visual designer.
         public static AppBuilder BuildAvaloniaApp()
         {
+            Settings.LoadSettings();
             var logger = new Serilog.LoggerConfiguration()
                .MinimumLevel.Debug()
-               .WriteTo.File("avalonia.log", LogEventLevel.Debug, fileSizeLimitBytes: 100000000)// restricted... is Optional
+               .WriteTo.File("avalonia.log", Settings.fileLogEventLevel, fileSizeLimitBytes: Settings.MaxLog * 1024, rollOnFileSizeLimit: true)// restricted... is Optional
                .CreateLogger();
+            
             Settings.avaloniaLogger = logger;
             TraceListener listener = new SerilogTraceListener.SerilogTraceListener(logger);
             Trace.Listeners.Add(listener);

+ 2 - 0
VeloeMinecraftLauncher/VeloeMinecraftLauncher.csproj

@@ -26,6 +26,8 @@
     <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
     <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
     <PackageReference Include="Avalonia.ReactiveUI" Version="0.10.18" />
+    <PackageReference Include="Egorozh.ColorPicker.Avalonia" Version="0.10.17" />
+    <PackageReference Include="Egorozh.ColorPicker.Avalonia.Dialog" Version="0.10.17" />
     <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.8" />
     <PackageReference Include="ReactiveUI.Validation" Version="3.0.1" />
     <PackageReference Include="Serilog" Version="2.11.0" />

+ 3 - 3
VeloeMinecraftLauncher/ViewModels/MainWindowViewModel.cs

@@ -44,8 +44,8 @@ namespace VeloeMinecraftLauncher.ViewModels
 
                     logger = new LoggerConfiguration()
                         .MinimumLevel.Debug()
-                        .WriteTo.Sink(eventSink)
-                        .WriteTo.File("launcher.log", LogEventLevel.Debug, fileSizeLimitBytes: 100000000)// restricted... is Optional
+                        .WriteTo.Sink(eventSink , Settings.consoleLogEventLevel)
+                        .WriteTo.File("launcher.log", Settings.fileLogEventLevel, fileSizeLimitBytes: Settings.MaxLog * 1024, rollOnFileSizeLimit: true)// restricted... is Optional
                         .CreateLogger();
                     Settings.logger = logger;
 
@@ -729,7 +729,7 @@ namespace VeloeMinecraftLauncher.ViewModels
     
         }
 
-        void OpenSettings()
+        public void OpenSettings()
         {
             var settingsWindow = new SettingsWindow { DataContext = new SettingsWindowViewModel() };
 

+ 80 - 5
VeloeMinecraftLauncher/ViewModels/SettingsWindowViewModel.cs

@@ -6,6 +6,12 @@ using System.Reflection;
 using VeloeMinecraftLauncher.MinecraftLauncher;
 using Avalonia.Controls;
 using System.Threading.Tasks;
+using System.Collections.ObjectModel;
+using Serilog.Events;
+using Avalonia.Media;
+using Avalonia;
+using Egorozh.ColorPicker;
+using VeloeMinecraftLauncher.Views;
 
 namespace VeloeMinecraftLauncher.ViewModels
 {
@@ -21,16 +27,28 @@ namespace VeloeMinecraftLauncher.ViewModels
             viewModel => viewModel.MaxRam,
             value => { UInt32 result; bool resultb = UInt32.TryParse(value, out result); /*logger.Debug("Validator result: {0} {1}", value, resultb);*/ IsValid = resultb; return resultb; },
             "Not a number.");
-        }
+
+            this.ValidationRule(
+            viewModel => viewModel.MaxLog,
+            value => { UInt32 result; bool resultb = UInt32.TryParse(value, out result); /*logger.Debug("Validator result: {0} {1}", value, resultb);*/ IsValid = resultb; return resultb; },
+            "Not a number.");
+       
+    }
 
         private string launcherVersion;
         private string minecraftFolderPath = Settings.MinecraftForlderPath;
         private string javaPath = Settings.JavaPath;
         private string maxRam = Settings.MaxRam.ToString();
         private bool isValid;
+        private LogEventLevel fileLogEventLevel = Settings.fileLogEventLevel;
+        private LogEventLevel consoleLogEventLevel = Settings.consoleLogEventLevel;
+        private string maxLog = Settings.MaxLog.ToString();
         
+        private ObservableCollection<LogEventLevel> logEventLevels = new() {LogEventLevel.Debug, LogEventLevel.Information, LogEventLevel.Warning, LogEventLevel.Error };
+        private ColorPickerControl ColorPicker = null;
+
         public bool UseCustomJava 
-            { 
+        { 
             get => Settings.useCustomJava; 
             set 
             {
@@ -116,11 +134,44 @@ namespace VeloeMinecraftLauncher.ViewModels
             }
         }
 
+        public ObservableCollection<LogEventLevel> LogEventLevels
+        {
+            get => logEventLevels;
+            set => this.RaiseAndSetIfChanged(ref logEventLevels, value);
+        }
+
+        public LogEventLevel FileLogEventLevel
+        {
+            get =>fileLogEventLevel;
+            set => this.RaiseAndSetIfChanged(ref fileLogEventLevel, value);
+        }
+
+        public LogEventLevel ConsoleLogEventLevel
+        {
+            get => consoleLogEventLevel;
+            set => this.RaiseAndSetIfChanged(ref consoleLogEventLevel, value);
+        }
+
+        public bool SetMaxLog
+        {
+            get => Settings.setMaxLog;
+            set => this.RaiseAndSetIfChanged(ref Settings.setMaxLog, value);
+        }
+
+        public string MaxLog
+        {
+            get => maxLog;
+            set => this.RaiseAndSetIfChanged(ref maxLog, value);
+        }
+
         public void SaveSettings()
         {
             Settings.JavaPath = javaPath;
             Settings.MinecraftForlderPath = minecraftFolderPath;
             Settings.MaxRam = UInt32.Parse(maxRam);
+            Settings.MaxLog = UInt32.Parse(maxLog);
+            Settings.consoleLogEventLevel = consoleLogEventLevel;
+            Settings.fileLogEventLevel = fileLogEventLevel;
             Settings.SaveSettings();
         }
 
@@ -136,7 +187,7 @@ namespace VeloeMinecraftLauncher.ViewModels
                     if (Settings.MinecraftForlderPath != String.Empty)
                         initPath = Path.GetFullPath(Settings.MinecraftForlderPath);
 
-                dialog.InitialDirectory = initPath;
+                dialog.Directory = initPath;
 
                 var result = dialog.ShowAsync(window).Result;
                 if (result is null)
@@ -161,7 +212,7 @@ namespace VeloeMinecraftLauncher.ViewModels
                     if (Settings.JavaPath != String.Empty)
                         initPath = Path.GetFullPath(Settings.JavaPath);
 
-                dialog.InitialDirectory = initPath;
+                dialog.Directory = initPath;
 
                 var result = dialog.ShowAsync(window).Result;
                 if (result is null)
@@ -173,5 +224,29 @@ namespace VeloeMinecraftLauncher.ViewModels
                 JavaPath = result;
             });
         }
+
+        public void SetColor(Window window)
+        {
+            if (ColorPicker == null)
+                ColorPicker = window.FindControl<ColorPickerControl>("ColorPicker");
+            InterfaceColor = Color.FromRgb(ColorPicker.Color.R, ColorPicker.Color.G, ColorPicker.Color.B);
+            MaterialOpacity = float.Parse(ColorPicker.Color.A.ToString())/byte.MaxValue;
+
+            if (ColorPicker.Color.R >= 200 && ColorPicker.Color.G >= 200 && ColorPicker.Color.B >= 200 || MaterialOpacity <= 0.1)
+            {
+                Application.Current.Styles[0] = App.FluentLight;
+                Application.Current.Styles[2] = App.FluentColorPickerThemeLight;
+                Application.Current.Styles[1] = App.DataGridFluent;
+            }
+            else
+            {
+                Application.Current.Styles[0] = App.FluentDark;
+                Application.Current.Styles[2] = App.FluentColorPickerThemeDark;
+                Application.Current.Styles[1] = App.DataGridFluent;
+            }
+
+            ((ViewModelBase)((MainWindow) window.Owner).DataContext).RaisePropertyChanged(nameof(InterfaceColor));
+            ((ViewModelBase)((MainWindow) window.Owner).DataContext).RaisePropertyChanged(nameof(MaterialOpacity));
+        }
     }
-    }
+}

+ 32 - 6
VeloeMinecraftLauncher/ViewModels/ViewModelBase.cs

@@ -1,16 +1,42 @@
+using Avalonia;
+using Avalonia.Media;
 using ReactiveUI;
-using ReactiveUI.Validation.Extensions;
 using ReactiveUI.Validation.Helpers;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Text;
+using VeloeMinecraftLauncher.MinecraftLauncher;
 
 namespace VeloeMinecraftLauncher.ViewModels
 {
     public class ViewModelBase : ReactiveValidationObject
     {
+        public ViewModelBase()
+        {
+            this.RaisePropertyChanged(nameof(InterfaceColor));
+            this.RaisePropertyChanged(nameof(MaterialOpacity));
 
+            if (InterfaceColor.R >= 200 && InterfaceColor.G >= 200 && InterfaceColor.B >= 200 || MaterialOpacity <= 0.1)
+            {
+                Application.Current.Styles[0] = App.FluentLight;
+                Application.Current.Styles[2] = App.FluentColorPickerThemeLight;
+                Application.Current.Styles[1] = App.DataGridFluent;
+            }
+            else
+            {
+                Application.Current.Styles[0] = App.FluentDark;
+                Application.Current.Styles[2] = App.FluentColorPickerThemeDark;
+                Application.Current.Styles[1] = App.DataGridFluent;
+            }
+        }
+        public Color InterfaceColor
+        {
+            get => Settings.backgroundColor;
+            set => this.RaiseAndSetIfChanged(ref Settings.backgroundColor, value);
+        }
+
+        public float MaterialOpacity
+        {
+            get => Settings.materialOpacity;
+            set => this.RaiseAndSetIfChanged(ref Settings.materialOpacity, value);
+        }
     }
+   
 }

+ 2 - 2
VeloeMinecraftLauncher/Views/ErrorWindow.axaml

@@ -25,9 +25,9 @@
 			<ExperimentalAcrylicBorder.Material>
 				<ExperimentalAcrylicMaterial
 					BackgroundSource="Digger"
-					TintColor="Black"
+					TintColor="{Binding InterfaceColor}"
 					TintOpacity="1"
-					MaterialOpacity="0.2" />
+					MaterialOpacity="{Binding MaterialOpacity}" />
 			</ExperimentalAcrylicBorder.Material>
 		</ExperimentalAcrylicBorder>
 		<DockPanel>

+ 6 - 7
VeloeMinecraftLauncher/Views/MainWindow.axaml

@@ -28,9 +28,9 @@
 			<ExperimentalAcrylicBorder.Material>
 				<ExperimentalAcrylicMaterial
 					BackgroundSource="Digger"
-					TintColor="Black"
+					TintColor="{Binding InterfaceColor}"
 					TintOpacity="1"
-					MaterialOpacity="0.2" />
+					MaterialOpacity="{Binding MaterialOpacity}" />
 			</ExperimentalAcrylicBorder.Material>
 		</ExperimentalAcrylicBorder>
 		<DockPanel>
@@ -88,7 +88,7 @@
 									<ExperimentalAcrylicBorder.Material>
 										<ExperimentalAcrylicMaterial
 											BackgroundSource="Digger"
-											TintColor="Black"
+											TintColor="{Binding InterfaceColor}"
 											TintOpacity="1"
 											MaterialOpacity="0.5" />
 									</ExperimentalAcrylicBorder.Material>
@@ -128,7 +128,7 @@
 									<ExperimentalAcrylicBorder.Material>
 										<ExperimentalAcrylicMaterial
 											BackgroundSource="Digger"
-											TintColor="Black"
+											TintColor="{Binding InterfaceColor}"
 											TintOpacity="1"
 											MaterialOpacity="0.5" />
 									</ExperimentalAcrylicBorder.Material>
@@ -168,7 +168,7 @@
 									<ExperimentalAcrylicBorder.Material>
 										<ExperimentalAcrylicMaterial
 											BackgroundSource="Digger"
-											TintColor="Black"
+											TintColor="{Binding InterfaceColor}"
 											TintOpacity="1"
 											MaterialOpacity="0.5" />
 									</ExperimentalAcrylicBorder.Material>
@@ -277,8 +277,7 @@
 					</Button>
 					<Button
 						Content="{Binding SettingsButton}"
-						Command="{Binding OpenSettings}"
-						IsVisible="true">
+						Command="{Binding OpenSettings}">
 					</Button>
 					<TextBlock
 						Margin="3">

+ 76 - 35
VeloeMinecraftLauncher/Views/SettingsWindow.axaml

@@ -4,9 +4,11 @@
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 		xmlns:titlebars="using:VeloeMinecraftLauncher.Views.TitleBar"
-        mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="300"
-		Width="600" Height="300"
-		MaxWidth="600" MaxHeight="300"
+		xmlns:dialog="clr-namespace:Egorozh.ColorPicker.Dialog;assembly=Egorozh.ColorPicker.Avalonia.Dialog"
+		xmlns:cp="clr-namespace:Egorozh.ColorPicker;assembly=Egorozh.ColorPicker.Avalonia"
+        mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="450"
+		Width="600" Height="450"
+		MaxWidth="600" MaxHeight="450"
         x:Class="VeloeMinecraftLauncher.Views.SettingsWindow"
         Icon="/Assets/avalonia-logo.ico"
         Title="Settings"
@@ -17,6 +19,11 @@
 		ExtendClientAreaChromeHints="NoChrome"
 		ExtendClientAreaTitleBarHeightHint="-1">
 
+	<Window.Styles>
+		<Style Selector="TabItem">
+			<Setter Property="FontSize" Value="16"/>
+		</Style>
+	</Window.Styles>
 	<Design.DataContext>
 		<vm:SettingsWindowViewModel/>
 	</Design.DataContext>
@@ -25,9 +32,9 @@
 			<ExperimentalAcrylicBorder.Material>
 				<ExperimentalAcrylicMaterial
 					BackgroundSource="Digger"
-					TintColor="Black"
+					TintColor="{Binding InterfaceColor}"
 					TintOpacity="1"
-					MaterialOpacity="0.2" />
+					MaterialOpacity="{Binding MaterialOpacity}" />
 			</ExperimentalAcrylicBorder.Material>
 		</ExperimentalAcrylicBorder>
 		<DockPanel>
@@ -35,45 +42,79 @@
 			  IsSeamless="False"
 			  IsIconVisible="False"
 			  IsMaximizeVisible="False"
-			  TitleText="Versions"
+			  TitleText="Settings"
 			  DockPanel.Dock="Top">
 			</titlebars:TitleBarWindow>
-			<Grid Margin="10 0 10 5" ShowGridLines="false">
-				<Grid.RowDefinitions>
-					<RowDefinition Height="0" MaxHeight="0"></RowDefinition>
-					<RowDefinition Height="*" MaxHeight="35"></RowDefinition>
-					<RowDefinition Height="*" MaxHeight="35"></RowDefinition>
-					<RowDefinition Height="Auto" MinHeight="35" MaxHeight="65" ></RowDefinition>
-					<RowDefinition Height="*" MaxHeight="35"></RowDefinition>
-					<RowDefinition Height="*" MaxHeight="35"></RowDefinition>
-					<RowDefinition Height="*"></RowDefinition>
-				</Grid.RowDefinitions>
-				<Grid.ColumnDefinitions>
-					<ColumnDefinition Width="250"></ColumnDefinition>
-					<ColumnDefinition Width="*"></ColumnDefinition>
-					<ColumnDefinition Width="70"></ColumnDefinition>
-				</Grid.ColumnDefinitions>
+			<TabControl
+				HorizontalAlignment="Stretch" DockPanel.Dock="Top">
+				<TabItem
+					Header="Game"
+					VerticalContentAlignment="Center">
+					<Grid Margin="10 0 10 5" ShowGridLines="false" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
+						
+						<Grid.ColumnDefinitions>
+							<ColumnDefinition Width="250"></ColumnDefinition>
+							<ColumnDefinition Width="*"></ColumnDefinition>
+							<ColumnDefinition Width="70"></ColumnDefinition>
+						</Grid.ColumnDefinitions>
 
-			
+						<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="true" IsEnabled="False">Set path to minecraft folder</CheckBox>
+						<TextBox Grid.Row="1" Grid.Column="1" Margin="5" Text="{Binding MinecraftFolderPath}" IsEnabled="{Binding SetMinecraftFolder}"></TextBox>
+						<Button Grid.Row="1" Grid.Column="2" Content="Open" Command="{Binding OpenMinecraftPathDialog}" CommandParameter="{Binding $parent[Window]}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
 
-				<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="true" IsEnabled="False">Set path to minecraft folder</CheckBox>
-				<TextBox Grid.Row="1" Grid.Column="1" Margin="5" Text="{Binding MinecraftFolderPath}" IsEnabled="{Binding SetMinecraftFolder}"></TextBox>
-				<Button Grid.Row="1" Grid.Column="2" Content="Open" Command="{Binding OpenMinecraftPathDialog}" CommandParameter="{Binding $parent[Window]}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
+						<CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding UseCustomJava}">Use custom java</CheckBox>
+						<TextBox Grid.Row="2" Grid.Column="1" Margin="5" Text="{Binding JavaPath}" IsEnabled="{Binding UseCustomJava}"></TextBox>
+						<Button Grid.Row="2" Grid.Column="2" Content="Open" Command="{Binding OpenJavaPathDialog}" CommandParameter="{Binding $parent[Window]}" IsEnabled="{Binding UseCustomJava}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
 
-				<CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding UseCustomJava}">Use custom java</CheckBox>
-				<TextBox Grid.Row="2" Grid.Column="1" Margin="5" Text="{Binding JavaPath}" IsEnabled="{Binding UseCustomJava}"></TextBox>
-				<Button Grid.Row="2" Grid.Column="2" Content="Open" Command="{Binding OpenJavaPathDialog}" CommandParameter="{Binding $parent[Window]}" IsEnabled="{Binding UseCustomJava}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"></Button>
+						<CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding SetMaxRam}">Set max RAM</CheckBox>
+						<TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="MaxRam" Text="{Binding MaxRam}" IsEnabled="{Binding SetMaxRam}" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
 
-				<CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding SetMaxRam}">Set max RAM</CheckBox>
-				<TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="MaxRam" Text="{Binding MaxRam}" IsEnabled="{Binding SetMaxRam}" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
+						<CheckBox Grid.Row="4" Grid.ColumnSpan="2" IsChecked="{Binding CheckAssets}" IsEnabled="True">Check vanilla game files before start</CheckBox>
+					</Grid>
+				</TabItem>
+				<TabItem
+					Header="Log"
+					VerticalContentAlignment="Center">
+					<Grid Margin="10 0 10 5" ShowGridLines="false" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
+						
+						<Grid.ColumnDefinitions>
+							<ColumnDefinition Width="250"></ColumnDefinition>
+							<ColumnDefinition Width="*"></ColumnDefinition>
+							<ColumnDefinition Width="70"></ColumnDefinition>
+						</Grid.ColumnDefinitions>
+						
+						<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Console log event level</TextBlock>
+						<ComboBox Grid.Row="1" Grid.Column="1" Margin="5" Items="{Binding LogEventLevels}" PlaceholderText="Select level" SelectedItem="{Binding ConsoleLogEventLevel}" HorizontalAlignment="Stretch"></ComboBox>
+						
+						<TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">File log event level</TextBlock>
+						<ComboBox Grid.Row="2" Grid.Column="1" Margin="5" Items="{Binding LogEventLevels}" PlaceholderText="Select level" SelectedItem="{Binding FileLogEventLevel}" HorizontalAlignment="Stretch"></ComboBox>
+						
+						<CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding SetMaxLog}">Set max log size</CheckBox>
+						<TextBox Grid.Row="3" Grid.Column="1" Margin="5" Name="MaxLog" Text="{Binding MaxLog}" IsEnabled="{Binding SetMaxLog}" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBox>
 
-				<CheckBox Grid.Row="4" Grid.Column="0" IsChecked="{Binding CheckAssets}" IsEnabled="True">Check game assets before start</CheckBox>
-				<CheckBox Grid.Row="5" Grid.ColumnSpan="2" IsChecked="{Binding GameLogToLauncher}">Show game log in launcher (performace issues)</CheckBox>
+						<CheckBox Grid.Row="4" Grid.ColumnSpan="2" IsChecked="{Binding GameLogToLauncher}">Show game log in launcher (performace issues)</CheckBox>
+					</Grid>
+				</TabItem>
+				<TabItem
+					Header="Interface"
+					VerticalContentAlignment="Center">
+					<Grid Margin="10 0 10 5" ShowGridLines="false" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto">
 
-				<Button Grid.Row="6" Grid.Column="0" Command="{Binding SaveSettings}" IsEnabled="{Binding IsValid}" Content="Save" VerticalAlignment="Top"></Button>
-				<TextBlock Grid.Row="6" Grid.Column="2" Text="{Binding LauncherVersion}" HorizontalAlignment="Right" VerticalAlignment="Bottom"></TextBlock>
+						<Grid.ColumnDefinitions>
+							<ColumnDefinition Width="100"></ColumnDefinition>
+							<ColumnDefinition Width="*"></ColumnDefinition>
+							<ColumnDefinition Width="70"></ColumnDefinition>
+						</Grid.ColumnDefinitions>
+						<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Color</TextBlock>
+						<cp:ColorPickerControl Name="ColorPicker" Grid.Row="1" Grid.Column="1" MaxWidth="300" MaxHeight="370" Color="{Binding InterfaceColor}" ></cp:ColorPickerControl>
+						
+						<Button Grid.Row="1" Grid.Column="2" Command="{Binding SetColor}" CommandParameter="{Binding $parent[Window]}" Content="Set"></Button>
 
-			</Grid>
+					</Grid>
+				</TabItem>
+			</TabControl>
+			<Button Command="{Binding SaveSettings}" IsEnabled="{Binding IsValid}" Content="Save" VerticalAlignment="Bottom" Margin="10 0 0 10"></Button>
+			<TextBlock Text="{Binding LauncherVersion}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 10 10"></TextBlock>			
 		</DockPanel>
 	</Panel>
 </Window>

+ 2 - 2
VeloeMinecraftLauncher/Views/VersionsDownloader.axaml

@@ -28,9 +28,9 @@
 			<ExperimentalAcrylicBorder.Material>
 				<ExperimentalAcrylicMaterial
 					BackgroundSource="Digger"
-					TintColor="Black"
+					TintColor="{Binding InterfaceColor}"
 					TintOpacity="1"
-					MaterialOpacity="0.2" />
+					MaterialOpacity="{Binding MaterialOpacity}" />
 			</ExperimentalAcrylicBorder.Material>
 		</ExperimentalAcrylicBorder>
 		<DockPanel>