Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2020-10-23 04:20:58 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2020-10-23 04:20:58 +0300
commit295dee03059b772dcceda12fbb386f26b9028351 (patch)
tree5a3f76f75bbca432193d8727be7395595596f580
parent6db8bd613ba869dfe8eeb84a62d174499e05c8d8 (diff)
v1.0.0.1v1.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
-rw-r--r--CHANGELOG.md8
-rw-r--r--UVtools.Core/Operations/OperationEditParameters.cs4
-rw-r--r--UVtools.WPF/App.axaml.cs14
-rw-r--r--UVtools.WPF/Assets/Themes/UVtools.themes2
-rw-r--r--UVtools.WPF/Assets/Themes/UVtoolsDark.xaml2
-rw-r--r--UVtools.WPF/Assets/Themes/UVtoolsLight.xaml10
-rw-r--r--UVtools.WPF/Assets/selected.theme1
-rw-r--r--UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs4
-rw-r--r--UVtools.WPF/MainWindow.axaml6
-rw-r--r--UVtools.WPF/UserSettings.cs19
10 files changed, 48 insertions, 22 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a795e3a..309ff07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/UVtools.Core/Operations/OperationEditParameters.cs b/UVtools.Core/Operations/OperationEditParameters.cs
index 8b26745..c40ec55 100644
--- a/UVtools.Core/Operations/OperationEditParameters.cs
+++ b/UVtools.Core/Operations/OperationEditParameters.cs
@@ -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)
{
diff --git a/UVtools.WPF/App.axaml.cs b/UVtools.WPF/App.axaml.cs
index e1b6fdb..52c9838 100644
--- a/UVtools.WPF/App.axaml.cs
+++ b/UVtools.WPF/App.axaml.cs
@@ -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();
diff --git a/UVtools.WPF/Assets/Themes/UVtools.themes b/UVtools.WPF/Assets/Themes/UVtools.themes
index caf7d59..409bb2b 100644
--- a/UVtools.WPF/Assets/Themes/UVtools.themes
+++ b/UVtools.WPF/Assets/Themes/UVtools.themes
@@ -48,7 +48,7 @@
"HighlightColor": "#FF119EDA",
"ErrorColor": "#FFFF0000",
"ErrorLowColor": "#10FF0000",
- "ThemeBorderThickness": "11",
+ "ThemeBorderThickness": "1",
"ThemeDisabledOpacity": 0.5,
"FontSizeSmall": 12.0,
"FontSizeNormal": 14.0,
diff --git a/UVtools.WPF/Assets/Themes/UVtoolsDark.xaml b/UVtools.WPF/Assets/Themes/UVtoolsDark.xaml
index 2c8dfc6..be0bf89 100644
--- a/UVtools.WPF/Assets/Themes/UVtoolsDark.xaml
+++ b/UVtools.WPF/Assets/Themes/UVtoolsDark.xaml
@@ -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>
diff --git a/UVtools.WPF/Assets/Themes/UVtoolsLight.xaml b/UVtools.WPF/Assets/Themes/UVtoolsLight.xaml
index 3dadc1d..c85b9b1 100644
--- a/UVtools.WPF/Assets/Themes/UVtoolsLight.xaml
+++ b/UVtools.WPF/Assets/Themes/UVtoolsLight.xaml
@@ -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>
diff --git a/UVtools.WPF/Assets/selected.theme b/UVtools.WPF/Assets/selected.theme
deleted file mode 100644
index fe05432..0000000
--- a/UVtools.WPF/Assets/selected.theme
+++ /dev/null
@@ -1 +0,0 @@
-UVtoolsLight \ No newline at end of file
diff --git a/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs b/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs
index d12721e..ec61293 100644
--- a/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs
+++ b/UVtools.WPF/Controls/Tools/ToolEditParametersControl.axaml.cs
@@ -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;
diff --git a/UVtools.WPF/MainWindow.axaml b/UVtools.WPF/MainWindow.axaml
index b9528c1..2f30434 100644
--- a/UVtools.WPF/MainWindow.axaml
+++ b/UVtools.WPF/MainWindow.axaml
@@ -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>
diff --git a/UVtools.WPF/UserSettings.cs b/UVtools.WPF/UserSettings.cs
index bd8ee85..c6dc4bb 100644
--- a/UVtools.WPF/UserSettings.cs
+++ b/UVtools.WPF/UserSettings.cs
@@ -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)