diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-05-24 01:19:58 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-05-24 01:19:58 +0300 |
commit | ff4e0dfe28572b151b4831f905110eeeaf57fb62 (patch) | |
tree | 1b9c363009c3ab0c9dafbcc5f03eb038d0c413f9 /UVtools.WPF | |
parent | ad92a0aa5cef5a9be46e2ba20ac5482fc9030015 (diff) |
v2.13.0v2.13.0
- (Add) Tool - Light bleed compensation: Compensate the over-curing and light bleed from clear resins by dimming the sequential pixels
- (Add) Infill: Honeycomb infill type
- (Upgrade) MessageBox from 1.2.0 to 1.3.1 to fix the small size messages
Diffstat (limited to 'UVtools.WPF')
-rw-r--r-- | UVtools.WPF/Assets/Icons/lightbulb-solid-16x16.png | bin | 0 -> 199 bytes | |||
-rw-r--r-- | UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml | 42 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml.cs | 20 | ||||
-rw-r--r-- | UVtools.WPF/Extensions/WindowExtensions.cs | 2 | ||||
-rw-r--r-- | UVtools.WPF/MainWindow.axaml.cs | 8 | ||||
-rw-r--r-- | UVtools.WPF/UVtools.WPF.csproj | 4 |
6 files changed, 74 insertions, 2 deletions
diff --git a/UVtools.WPF/Assets/Icons/lightbulb-solid-16x16.png b/UVtools.WPF/Assets/Icons/lightbulb-solid-16x16.png Binary files differnew file mode 100644 index 0000000..f182d01 --- /dev/null +++ b/UVtools.WPF/Assets/Icons/lightbulb-solid-16x16.png diff --git a/UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml b/UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml new file mode 100644 index 0000000..294927e --- /dev/null +++ b/UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml @@ -0,0 +1,42 @@ +<UserControl xmlns="https://github.com/avaloniaui" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" + x:Class="UVtools.WPF.Controls.Tools.ToolLightBleedCompensationControl"> + <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,500"> + <TextBlock Grid.Row="0" Grid.Column="0" + VerticalAlignment="Center" + Text="Pixel lookup mode:"/> + + <ComboBox Grid.Row="0" Grid.Column="2" + HorizontalAlignment="Stretch" + Items="{Binding Operation.LookupMode, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}" + SelectedItem="{Binding Operation.LookupMode, Converter={StaticResource FromValueDescriptionToEnumConverter}}"/> + + <TextBlock Grid.Row="2" Grid.Column="0" + VerticalAlignment="Center" + ToolTip.Tip="List of brightnesses to subtract for each subsequent pixel, format: 1-254, 1-254, 1-254, ..." + Text="Dim subsequent pixels by:"/> + + <TextBox Grid.Row="2" Grid.Column="2" + VerticalAlignment="Center" + Text="{Binding Operation.DimBy}"/> + + <TextBlock Grid.Row="4" Grid.Column="0" + VerticalAlignment="Center" + Text="Minimum pixel brightness:"/> + + <TextBlock Grid.Row="4" Grid.Column="2" + VerticalAlignment="Center" + Text="{Binding Operation.MinimumBrightness, StringFormat={}{0} of 255}"/> + + <TextBlock Grid.Row="6" Grid.Column="0" + VerticalAlignment="Center" + Text="Maximum subtraction:"/> + + <TextBlock Grid.Row="6" Grid.Column="2" + VerticalAlignment="Center" + Text="{Binding Operation.MaximumSubtraction, StringFormat={}{0} of 255}"/> + </Grid> +</UserControl> diff --git a/UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml.cs b/UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml.cs new file mode 100644 index 0000000..1cb0f32 --- /dev/null +++ b/UVtools.WPF/Controls/Tools/ToolLightBleedCompensationControl.axaml.cs @@ -0,0 +1,20 @@ +using Avalonia.Markup.Xaml; +using UVtools.Core.Operations; + +namespace UVtools.WPF.Controls.Tools +{ + public partial class ToolLightBleedCompensationControl : ToolControl + { + public OperationLightBleedCompensation Operation => BaseOperation as OperationLightBleedCompensation; + public ToolLightBleedCompensationControl() + { + InitializeComponent(); + BaseOperation = new OperationLightBleedCompensation(SlicerFile); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} diff --git a/UVtools.WPF/Extensions/WindowExtensions.cs b/UVtools.WPF/Extensions/WindowExtensions.cs index e1bf8ad..247f71a 100644 --- a/UVtools.WPF/Extensions/WindowExtensions.cs +++ b/UVtools.WPF/Extensions/WindowExtensions.cs @@ -34,6 +34,8 @@ namespace UVtools.WPF.Extensions WindowStartupLocation = location, CanResize = false, MaxWidth = window.GetScreenWorkingArea().Width - UserSettings.Instance.General.WindowsHorizontalMargin, + MaxHeight = window.GetScreenWorkingArea().Height - UserSettings.Instance.General.WindowsVerticalMargin, + SizeToContent = SizeToContent.WidthAndHeight, ShowInCenter = true }); return await messageBoxStandardWindow.ShowDialog(window); diff --git a/UVtools.WPF/MainWindow.axaml.cs b/UVtools.WPF/MainWindow.axaml.cs index 14750fc..d146014 100644 --- a/UVtools.WPF/MainWindow.axaml.cs +++ b/UVtools.WPF/MainWindow.axaml.cs @@ -175,6 +175,14 @@ namespace UVtools.WPF }, new() { + Tag = new OperationLightBleedCompensation(), + Icon = new Avalonia.Controls.Image + { + Source = new Bitmap(App.GetAsset("/Assets/Icons/lightbulb-solid-16x16.png")) + } + }, + new() + { Tag = new OperationInfill(), Icon = new Avalonia.Controls.Image { diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj index e54e0d5..16f4847 100644 --- a/UVtools.WPF/UVtools.WPF.csproj +++ b/UVtools.WPF/UVtools.WPF.csproj @@ -12,7 +12,7 @@ <PackageLicenseFile>LICENSE</PackageLicenseFile> <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <RepositoryType>Git</RepositoryType> - <Version>2.12.2</Version> + <Version>2.13.0</Version> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> @@ -30,7 +30,7 @@ <PackageReference Include="Avalonia.Desktop" Version="0.10.5" /> <PackageReference Include="Avalonia.Diagnostics" Version="0.10.5" /> <PackageReference Include="Emgu.CV.runtime.windows" Version="4.5.1.4349" /> - <PackageReference Include="MessageBox.Avalonia" Version="1.2.0" /> + <PackageReference Include="MessageBox.Avalonia" Version="1.3.1" /> <PackageReference Include="ThemeEditor.Controls.ColorPicker" Version="0.10.4" /> </ItemGroup> <ItemGroup> |