mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
v1.0.0.1
* (Change) Checked and click buttons highlight color for better distinguish * (Fix) Move user settings to LocalUser folder to allow save without run as admin * (Fix) Save button for print parameters were invisible
This commit is contained in:
+7
-1
@@ -1,6 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 10/22/2020 - v1.0.0.0
|
||||
## 23/10/2020 - v1.0.0.1
|
||||
|
||||
* (Change) Checked and click buttons highlight color for better distinguish
|
||||
* (Fix) Move user settings to LocalUser folder to allow save without run as admin
|
||||
* (Fix) Save button for print parameters were invisible
|
||||
|
||||
## 22/10/2020 - v1.0.0.0
|
||||
|
||||
* (Add) Multi-OS with Linux and MacOS support
|
||||
* (Add) Themes support
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace UVtools.Core.Operations
|
||||
}
|
||||
}
|
||||
|
||||
public override string ProgressTitle => null;
|
||||
public override string ProgressTitle => "Change print parameters";
|
||||
|
||||
public override string ProgressAction => null;
|
||||
public override string ProgressAction => "Changing print parameters";
|
||||
|
||||
public override StringTag Validate(params object[] parameters)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,17 @@ namespace UVtools.WPF
|
||||
UserSettings.SetVersion();
|
||||
|
||||
ThemeSelector = Avalonia.ThemeManager.ThemeSelector.Create("Assets/Themes");
|
||||
ThemeSelector.LoadSelectedTheme("Assets/selected.theme");
|
||||
ThemeSelector.LoadSelectedTheme(Path.Combine(UserSettings.SettingsFolder, "selected.theme"));
|
||||
if (ThemeSelector.SelectedTheme.Name == "UVtoolsDark")
|
||||
{
|
||||
foreach (var theme in ThemeSelector.Themes)
|
||||
{
|
||||
if (theme.Name != "UVtoolsLight") continue;
|
||||
theme.ApplyTheme();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow = new MainWindow();
|
||||
|
||||
try
|
||||
@@ -70,7 +80,7 @@ namespace UVtools.WPF
|
||||
|
||||
desktop.MainWindow = MainWindow;
|
||||
desktop.Exit += (sender, e)
|
||||
=> ThemeSelector.SaveSelectedTheme("Assets/selected.theme");
|
||||
=> ThemeSelector.SaveSelectedTheme(Path.Combine(UserSettings.SettingsFolder, "selected.theme"));
|
||||
}
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
"HighlightColor": "#FF119EDA",
|
||||
"ErrorColor": "#FFFF0000",
|
||||
"ErrorLowColor": "#10FF0000",
|
||||
"ThemeBorderThickness": "11",
|
||||
"ThemeBorderThickness": "1",
|
||||
"ThemeDisabledOpacity": 0.5,
|
||||
"FontSizeSmall": 12.0,
|
||||
"FontSizeNormal": 14.0,
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<SolidColorBrush x:Key="ErrorBrush" Color="{DynamicResource ErrorColor}"></SolidColorBrush>
|
||||
<SolidColorBrush x:Key="ErrorLowBrush" Color="{DynamicResource ErrorLowColor}"></SolidColorBrush>
|
||||
|
||||
<Thickness x:Key="ThemeBorderThickness">11</Thickness>
|
||||
<Thickness x:Key="ThemeBorderThickness">1</Thickness>
|
||||
<sys:Double x:Key="ThemeDisabledOpacity">0.5</sys:Double>
|
||||
|
||||
<sys:Double x:Key="FontSizeSmall">12</sys:Double>
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
<Color x:Key="ThemeBorderLowColor">#FFAAAAAA</Color>
|
||||
<Color x:Key="ThemeBorderMidColor">#FF888888</Color>
|
||||
<Color x:Key="ThemeBorderHighColor">#FF333333</Color>
|
||||
<Color x:Key="ThemeControlLowColor">#FFFFFFFF</Color>
|
||||
<Color x:Key="ThemeControlMidColor">#FFAAAAAA</Color>
|
||||
<Color x:Key="ThemeControlHighColor">#FF888888</Color>
|
||||
<Color x:Key="ThemeControlLowColor">#FFFFFFFF</Color><!-- !-->
|
||||
<Color x:Key="ThemeControlMidColor">#FFAAAAAA</Color><!-- Controls normal state background !-->
|
||||
<Color x:Key="ThemeControlHighColor">#f1c40f</Color> <!-- Checked and clicked controls !-->
|
||||
<Color x:Key="ThemeControlHighlightLowColor">#FFF0F0F0</Color>
|
||||
<Color x:Key="ThemeControlHighlightMidColor">#FFD0D0D0</Color>
|
||||
<Color x:Key="ThemeControlHighlightMidColor">#FFD0D0D0</Color><!-- Tab background !-->
|
||||
<Color x:Key="ThemeControlHighlightHighColor">#FF808080</Color>
|
||||
<Color x:Key="ThemeForegroundColor">#FF000000</Color>
|
||||
<Color x:Key="ThemeForegroundLowColor">#FF808080</Color>
|
||||
|
||||
<Color x:Key="HighlightColor">#FF086F9E</Color>
|
||||
<Color x:Key="HighlightColor">#FF086F9E</Color> <!-- Highlight text, checks, radios !-->
|
||||
<Color x:Key="ErrorColor">#FFFF0000</Color>
|
||||
<Color x:Key="ErrorLowColor">#10FF0000</Color>
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
UVtoolsLight
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media.Imaging;
|
||||
using UVtools.Core.Extensions;
|
||||
using UVtools.Core.FileFormats;
|
||||
using UVtools.Core.Operations;
|
||||
|
||||
@@ -1406,7 +1406,7 @@
|
||||
|
||||
<ToggleButton
|
||||
IsChecked="{Binding ShowLayerImageDifference}"
|
||||
ToolTip.Tip="Show layer differences where daker pixels were also present on previous layer and the white pixels the difference between previous and current layer."
|
||||
ToolTip.Tip="Show layer differences where darker pixels were also present on previous layer and the white pixels the difference between previous and current layer."
|
||||
>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/Assets/Icons/layers-16x16.png"/>
|
||||
@@ -1420,7 +1420,7 @@
|
||||
>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/Assets/Icons/warning-16x16.png"/>
|
||||
<TextBlock Margin="5,0,5,0" Text="Issuess"/>
|
||||
<TextBlock Margin="5,0,5,0" Text="Issues"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
|
||||
@@ -1430,7 +1430,7 @@
|
||||
>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/Assets/Icons/crosshairs-16x16.png"/>
|
||||
<TextBlock Margin="5,0,5,0" Text="Crossharis"/>
|
||||
<TextBlock Margin="5,0,5,0" Text="Crosshairs"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml.Serialization;
|
||||
using Avalonia.Media;
|
||||
using JetBrains.Annotations;
|
||||
using ReactiveUI;
|
||||
using UVtools.Core;
|
||||
using Color=UVtools.WPF.Structures.Color;
|
||||
|
||||
namespace UVtools.WPF
|
||||
@@ -943,10 +945,21 @@ namespace UVtools.WPF
|
||||
#endregion
|
||||
|
||||
#region Singleton
|
||||
|
||||
public static string SettingsFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), About.Software);
|
||||
Directory.CreateDirectory(path);
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default filepath for store <see cref="UserSettings"/>
|
||||
/// </summary>
|
||||
private const string FilePath = "Assets/usersettings.xml";
|
||||
private static string FilePath => Path.Combine(SettingsFolder, "usersettings.xml");
|
||||
|
||||
|
||||
private static UserSettings _instance;
|
||||
@@ -1077,9 +1090,9 @@ namespace UVtools.WPF
|
||||
}
|
||||
|
||||
var serializer = new XmlSerializer(typeof(UserSettings));
|
||||
using var myXmlReader = new StreamReader(FilePath);
|
||||
try
|
||||
{
|
||||
using var myXmlReader = new StreamReader(FilePath);
|
||||
_instance = (UserSettings)serializer.Deserialize(myXmlReader);
|
||||
if (_instance.General.MaxDegreeOfParallelism <= 0)
|
||||
_instance.General.MaxDegreeOfParallelism = Environment.ProcessorCount;
|
||||
@@ -1109,9 +1122,9 @@ namespace UVtools.WPF
|
||||
Instance.SavesCount++;
|
||||
_instance.ModifiedDateTime = DateTime.Now;
|
||||
var serializer = new XmlSerializer(_instance.GetType());
|
||||
using var myXmlWriter = new StreamWriter(FilePath);
|
||||
try
|
||||
{
|
||||
using var myXmlWriter = new StreamWriter(FilePath);
|
||||
serializer.Serialize(myXmlWriter, _instance);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user