diff --git a/CHANGELOG.md b/CHANGELOG.md index f54f2a46..5ed9bb7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,13 @@ - (Improvement) Goo: On encode image do not use gradient compression when going from grey to black or white - (Change) PZR: Disable gradient compression for this file format as it corrupt layer for Phrozen Sonic Mini 8K S (#776, #810, #814) - (Fix) Thumbnail text generation and for partial open files -- (Add) Title bar: Display the loaded file size and re-arrange the last operation run time to the right -- (Improvement) Re-arrange some items on `File` and `Help` menu -- (Fix) Layer actions - Import layer(s): Unable to process image files (#815) -- (Fix) PCB Exposure: Draw circles using ellipses in order to use non-square pixels (#822) +- **UI:** + - (Add) Title bar: Display the loaded file size and re-arrange the last operation run time to the right + - (Improvement) Re-arrange some items on `File` and `Help` menu + - (Improvement) Use icons instead UTF-8 character for buttons with drop-down menus +- **Tools:** + - (Fix) Layer actions - Import layer(s): Unable to process image files (#815) + - (Fix) PCB Exposure: Draw circles using ellipses in order to use non-square pixels (#822) - (Fix) PrusaSlicer Printer: "Elegoo Mars 4" is wrongly named, renamed to "Elegoo Mars 4 DLP" and added the corresponding "Elegoo Mars 4" - (Upgrade) .NET from 6.0.25 to 6.0.26 - (Upgrade) AvaloniaUI from 11.0.6 to 11.0.7 (Fixes #803, #812) diff --git a/README.md b/README.md index e65d8ca7..c997267b 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,7 @@ The fastest way to compile the project is by run the `build/compile.bat`, howeve 1. Install the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) if not included on previous installation 1. Install the [Avalonia for Visual Studio](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaVS): 1. Install the Wix Toolset: (Required only for MSI build, **optional**) - - `dotnet tool install --global wix --version 4.0.0` + - `dotnet tool install --global wix` - [Visual Studio HeatWave extension](https://www.firegiant.com/wix/heatwave) 1. Open UVtools.sln 1. Build diff --git a/UVtools.CAD/UVtools_fb_cover.svg b/UVtools.CAD/UVtools_fb_cover.svg new file mode 100644 index 00000000..e60ada61 --- /dev/null +++ b/UVtools.CAD/UVtools_fb_cover.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + TOOLS + + + + + + + + + + + + + + + + + diff --git a/UVtools.UI/Assets/Styles/Styles.axaml b/UVtools.UI/Assets/Styles/Styles.axaml index 2653bc27..d4d5406c 100644 --- a/UVtools.UI/Assets/Styles/Styles.axaml +++ b/UVtools.UI/Assets/Styles/Styles.axaml @@ -1,13 +1,14 @@  + xmlns:uac="clr-namespace:UVtools.AvaloniaControls;assembly=UVtools.AvaloniaControls" + xmlns:controls="clr-namespace:UVtools.UI.Controls"> - + @@ -367,5 +368,13 @@ - + + + + + \ No newline at end of file diff --git a/UVtools.UI/Controls/DropDownButtonWithIcon.cs b/UVtools.UI/Controls/DropDownButtonWithIcon.cs index 8c88baa8..d14137e1 100644 --- a/UVtools.UI/Controls/DropDownButtonWithIcon.cs +++ b/UVtools.UI/Controls/DropDownButtonWithIcon.cs @@ -1,6 +1,6 @@ using Avalonia; using Avalonia.Controls; -using Avalonia.Controls.Primitives; +using Avalonia.Input; using Avalonia.Layout; using System; @@ -10,6 +10,15 @@ public class DropDownButtonWithIcon : DropDownButton { protected override Type StyleKeyOverride => typeof(DropDownButton); + public static readonly StyledProperty OpenFlyoutWithRightClickProperty = + AvaloniaProperty.Register(nameof(OpenFlyoutWithRightClick), defaultValue: true); + + public bool OpenFlyoutWithRightClick + { + get => GetValue(OpenFlyoutWithRightClickProperty); + set => SetValue(OpenFlyoutWithRightClickProperty, value); + } + public static readonly StyledProperty TextProperty = ButtonWithIcon.TextProperty.AddOwner(); @@ -61,6 +70,15 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e) } } + protected override void OnPointerReleased(PointerReleasedEventArgs e) + { + base.OnPointerReleased(e); + if (e.InitialPressMouseButton == MouseButton.Right && OpenFlyoutWithRightClick) + { + OpenFlyout(); + } + } + public Projektanker.Icons.Avalonia.Icon MakeIcon() { return new Projektanker.Icons.Avalonia.Icon { Value = Icon }; diff --git a/UVtools.UI/Controls/SplitButtonWithIcon.cs b/UVtools.UI/Controls/SplitButtonWithIcon.cs index f009f069..e6edbb96 100644 --- a/UVtools.UI/Controls/SplitButtonWithIcon.cs +++ b/UVtools.UI/Controls/SplitButtonWithIcon.cs @@ -2,13 +2,22 @@ using Avalonia.Controls; using Avalonia.Layout; using System; +using Avalonia.Input; namespace UVtools.UI.Controls; public class SplitButtonWithIcon : SplitButton { protected override Type StyleKeyOverride => typeof(SplitButton); + + public static readonly StyledProperty OpenFlyoutWithRightClickProperty = + AvaloniaProperty.Register(nameof(OpenFlyoutWithRightClick), defaultValue: true); + public bool OpenFlyoutWithRightClick + { + get => GetValue(OpenFlyoutWithRightClickProperty); + set => SetValue(OpenFlyoutWithRightClickProperty, value); + } public static readonly StyledProperty TextProperty = ButtonWithIcon.TextProperty.AddOwner(); @@ -61,6 +70,15 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e) } } + protected override void OnPointerReleased(PointerReleasedEventArgs e) + { + base.OnPointerReleased(e); + if (e.InitialPressMouseButton == MouseButton.Right && OpenFlyoutWithRightClick) + { + OpenFlyout(); + } + } + public Projektanker.Icons.Avalonia.Icon MakeIcon() { return new Projektanker.Icons.Avalonia.Icon { Value = Icon }; diff --git a/UVtools.UI/Controls/ToggleSplitButtonWithIcon.cs b/UVtools.UI/Controls/ToggleSplitButtonWithIcon.cs index 6b281855..5d6e9a47 100644 --- a/UVtools.UI/Controls/ToggleSplitButtonWithIcon.cs +++ b/UVtools.UI/Controls/ToggleSplitButtonWithIcon.cs @@ -1,12 +1,21 @@ using Avalonia; using Avalonia.Controls; -using Avalonia.Controls.Primitives; +using Avalonia.Input; using Avalonia.Layout; namespace UVtools.UI.Controls; public class ToggleSplitButtonWithIcon : ToggleSplitButton { + public static readonly StyledProperty OpenFlyoutWithRightClickProperty = + AvaloniaProperty.Register(nameof(OpenFlyoutWithRightClick), defaultValue: true); + + public bool OpenFlyoutWithRightClick + { + get => GetValue(OpenFlyoutWithRightClickProperty); + set => SetValue(OpenFlyoutWithRightClickProperty, value); + } + public static readonly StyledProperty TextProperty = ButtonWithIcon.TextProperty.AddOwner(); @@ -58,6 +67,16 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e) } } + protected override void OnPointerReleased(PointerReleasedEventArgs e) + { + base.OnPointerReleased(e); + if (e.InitialPressMouseButton == MouseButton.Right && OpenFlyoutWithRightClick) + { + + OpenFlyout(); + } + } + public Projektanker.Icons.Avalonia.Icon MakeIcon() { return new Projektanker.Icons.Avalonia.Icon { Value = Icon }; diff --git a/UVtools.UI/MainWindow.LayerPreview.cs b/UVtools.UI/MainWindow.LayerPreview.cs index 62edec02..eea671db 100644 --- a/UVtools.UI/MainWindow.LayerPreview.cs +++ b/UVtools.UI/MainWindow.LayerPreview.cs @@ -2071,7 +2071,7 @@ private async void LayerImageBox_KeyUp(object? sender, KeyEventArgs e) operation.SelectCurrentLayer(ActualLayer); layerRange = $"in the current {ActualLayer} layer"; } - + if (await this.MessageBoxQuestion($"Are you sure you want to keep only the selected region/mask(s) {layerRange}?", "Keep only selected region/mask(s)?") != MessageButtonResult.Yes) return; await RunOperation(operation); diff --git a/UVtools.UI/MainWindow.axaml b/UVtools.UI/MainWindow.axaml index 6b1b9301..27f4fb84 100644 --- a/UVtools.UI/MainWindow.axaml +++ b/UVtools.UI/MainWindow.axaml @@ -448,69 +448,59 @@ - - - - - - + + + + + - + - + - + - + - + - - - - - + + + - - - - - - + Icon="fa-solid fa-sync-alt" + Spacing="5" + Text="Detect" + Command="{Binding OnClickDetectIssues}"> + + + + + VerticalAlignment="Center" + IsChecked="{Binding Settings.Issues.ComputeResinTraps}" + Content="Resin traps"/> + Minimum="0" + Maximum="{Binding SlicerFile.LastLayerIndex}" + Increment="1" + Width="110" + Value="{Binding ResinTrapDetectionStartLayer}"/>