diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-08-19 06:48:59 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-08-19 06:48:59 +0300 |
commit | 9ecfdf55efe5c3366edbc78561cc2a42bb587d8e (patch) | |
tree | 928af1d89991e6c8fa4de9ac5dde430dc7d5fe89 | |
parent | f0413a925575a8c5943d33dbeada871571309666 (diff) |
v2.19.1v2.19.1
- (Add) Setting - Allow to resize the tool windows: Check this option if you have problems with content being cut on some windows, down-size the height by a bit and then expand to fix the content.
- (Fix) File formats: When converting from a TSMC-able file to an TSMC-unable file, the LiftHeight will be set to the total lift (1+2) as fail-safe guard
- (Fix) Pixel Arithmetic: Keep pattern visible by default to prevent content from being cut when made visible
- **(Fix) CTBv4:**
- LiftHeight and LiftHeight2 properties when using TSMC, LiftHeight on CTB is the total of lifts 1+2
- Soft-save is corrupting the file
-rw-r--r-- | CHANGELOG.md | 10 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/CTBEncryptedFile.cs | 6 | ||||
-rw-r--r-- | UVtools.Core/UVtools.Core.csproj | 2 | ||||
-rw-r--r-- | UVtools.WPF/Assets/Styles/Styles.xaml | 5 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml | 20 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml | 49 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Calibrators/CalibrateStressTowerControl.axaml | 19 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml | 30 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml | 30 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Tools/ToolMorphControl.axaml | 9 | ||||
-rw-r--r-- | UVtools.WPF/Controls/Tools/ToolPixelArithmeticControl.axaml | 18 | ||||
-rw-r--r-- | UVtools.WPF/UVtools.WPF.csproj | 4 | ||||
-rw-r--r-- | UVtools.WPF/UserSettings.cs | 7 | ||||
-rw-r--r-- | UVtools.WPF/Windows/MaterialManagerWindow.axaml | 18 | ||||
-rw-r--r-- | UVtools.WPF/Windows/SettingsWindow.axaml | 7 | ||||
-rw-r--r-- | UVtools.WPF/Windows/ToolWindow.axaml | 10 | ||||
-rw-r--r-- | UVtools.WPF/Windows/ToolWindow.axaml.cs | 13 |
17 files changed, 105 insertions, 152 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c57c1d..dc6451e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 19/08/2021 - v2.19.1 + +- (Add) Setting - Allow to resize the tool windows: Check this option if you have problems with content being cut on some windows, down-size the height by a bit and then expand to fix the content. +- (Fix) File formats: When converting from a TSMC-able file to an TSMC-unable file, the LiftHeight will be set to the total lift (1+2) as fail-safe guard +- (Fix) Pixel Arithmetic: Keep pattern visible by default to prevent content from being cut when made visible +- **(Fix) CTBv4:** + - LiftHeight and LiftHeight2 properties when using TSMC, LiftHeight on CTB is the total of lifts 1+2 + - Soft-save is corrupting the file + ## 17/08/2021 - v2.19.0 - **File formats:** @@ -46,6 +55,7 @@ - (Change) Icon for File - Open and Open in a new file - (Change) Rename File - Extract to: Extract file contents - (Upgrade) AvaloniaUI from 0.10.6 to 0.10.7 +- (Fix) PhotonS: Allow to use different resolution than printer default - (Fix) PW0, PWM, PWMX, PWMO, PWMS: Unable to decode some files with AntiAliasing (#143) ## 12/08/2021 - v2.18.0 diff --git a/UVtools.Core/FileFormats/CTBEncryptedFile.cs b/UVtools.Core/FileFormats/CTBEncryptedFile.cs index 8115535..a1697f2 100644 --- a/UVtools.Core/FileFormats/CTBEncryptedFile.cs +++ b/UVtools.Core/FileFormats/CTBEncryptedFile.cs @@ -1115,11 +1115,11 @@ namespace UVtools.Core.FileFormats inputFile.Seek(Settings.LayerPointersOffset, SeekOrigin.Begin); LayersPointer = new LayerPointer[Settings.LayerCount]; - for (var i = 0; i < Settings.LayerCount; i++) + for (uint layerIndex = 0; layerIndex < Settings.LayerCount; layerIndex++) { progress.Token.ThrowIfCancellationRequested(); - LayersPointer[i] = Helpers.Deserialize<LayerPointer>(inputFile); - Debug.WriteLine($"pointer[{i}]: {LayersPointer[i]}"); + LayersPointer[layerIndex] = Helpers.Deserialize<LayerPointer>(inputFile); + Debug.WriteLine($"pointer[{layerIndex}]: {LayersPointer[layerIndex]}"); progress++; } diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index b808a40..cd9856b 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -10,7 +10,7 @@ <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl> <Description>MSLA/DLP, file analysis, calibration, repair, conversion and manipulation</Description> - <Version>2.19.0</Version> + <Version>2.19.1</Version> <Copyright>Copyright © 2020 PTRTECH</Copyright> <PackageIcon>UVtools.png</PackageIcon> <Platforms>AnyCPU;x64</Platforms> diff --git a/UVtools.WPF/Assets/Styles/Styles.xaml b/UVtools.WPF/Assets/Styles/Styles.xaml index a650e7c..a513a8a 100644 --- a/UVtools.WPF/Assets/Styles/Styles.xaml +++ b/UVtools.WPF/Assets/Styles/Styles.xaml @@ -38,5 +38,10 @@ <Style Selector="TabControl"> <Setter Property="Padding" Value="0"></Setter> </Style> + + <Style Selector="Expander /template/ ToggleButton"> + <Setter Property="FontWeight" Value="Bold" /> + <Setter Property="Cursor" Value="Hand" /> + </Style> </Styles>
\ No newline at end of file diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml index 885987f..954929a 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateElephantFootControl.axaml @@ -189,14 +189,9 @@ </Grid> - - - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="{Binding Operation.ErodeObjects, StringFormat=Morph - Erode [\{0\} objects]}" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="{Binding Operation.ErodeObjects, StringFormat=Morph - Erode [\{0\} objects]}" + IsExpanded="True"> <StackPanel> <Grid @@ -275,12 +270,9 @@ </Expander> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="{Binding Operation.DimmingObjects, StringFormat=Wall dimming [\{0\} objects]}" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="{Binding Operation.DimmingObjects, StringFormat=Wall dimming [\{0\} objects]}" + IsExpanded="True"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,5,Auto" diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml index 7061e5d..dda24b6 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateExposureFinderControl.axaml @@ -7,12 +7,9 @@ <Grid ColumnDefinitions="Auto,10,380"> <StackPanel Spacing="10"> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Common properties" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Common properties" + IsExpanded="True"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" @@ -183,13 +180,9 @@ </Grid> </Expander> - <Expander IsExpanded="True" IsVisible="{Binding !Operation.PatternModel}"> - <Expander.Header> - <TextBlock Text="Object configuration" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> + <Expander + Header="Object configuration" + IsExpanded="True" IsVisible="{Binding !Operation.PatternModel}"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,Auto,5,Auto,20,Auto,10,Auto,5,Auto,20,Auto,10,Auto,5,Auto"> @@ -805,19 +798,15 @@ </StackPanel> </Expander> - <Expander IsExpanded="False"> + <Expander + Header="Multiple layer height" + IsExpanded="False"> <Expander.IsVisible> <MultiBinding Converter="{x:Static BoolConverters.And}"> <Binding Path="CanSupportPerLayerSettings"/> <Binding Path="!Operation.PatternModel"/> </MultiBinding> </Expander.IsVisible> - <Expander.Header> - <TextBlock Text="Multiple layer height" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> <StackPanel Spacing="10"> @@ -875,13 +864,9 @@ </Expander> - <Expander IsExpanded="True" IsVisible="{Binding CanSupportPerLayerSettings}"> - <Expander.Header> - <TextBlock Text="Multiple exposures" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> + <Expander + Header="Multiple exposures" + IsExpanded="True" IsVisible="{Binding CanSupportPerLayerSettings}"> <StackPanel Spacing="10"> @@ -1205,13 +1190,9 @@ </Expander> - <Expander IsExpanded="False" IsVisible="{Binding Operation.CanPatternModel}"> - <Expander.Header> - <TextBlock Text="Pattern loaded model" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> + <Expander + Header="Pattern loaded model" + IsExpanded="False" IsVisible="{Binding Operation.CanPatternModel}"> <StackPanel Spacing="10"> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateStressTowerControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateStressTowerControl.axaml index ac36835..fce1e53 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateStressTowerControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateStressTowerControl.axaml @@ -7,12 +7,9 @@ <StackPanel Spacing="10"> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 1 - Common properties" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Step 1 - Common properties" + IsExpanded="True"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" @@ -215,13 +212,9 @@ </Grid> </Expander> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Outer Spirals" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> + <Expander + Header="Outer Spirals" + IsExpanded="True"> <Grid RowDefinitions="Auto,5,Auto" ColumnDefinitions="Auto,10,170,5,Auto,20,Auto,10,170,5,Auto"> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml index 22516d2..afee112 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateToleranceControl.axaml @@ -7,13 +7,9 @@ <Grid ColumnDefinitions="Auto,10,380"> <StackPanel Spacing="10"> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 1 - Common properties" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> - + <Expander + Header="Step 1 - Common properties" + IsExpanded="True"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,170,5,Auto,20,Auto,10,170,5,Auto"> @@ -241,14 +237,7 @@ </Grid> </Expander> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 2 - Female part" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> - + <Expander Header="Step 2 - Female part" IsExpanded="True"> <Grid RowDefinitions="Auto,5,Auto" ColumnDefinitions="Auto,10,170,5,Auto,20,Auto,10,170,5,Auto"> @@ -301,14 +290,9 @@ </Expander> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 3 - Male parts" - FontWeight="Bold" - Cursor="Hand"/> - - </Expander.Header> - + <Expander + Header="Step 3 - Male parts" + IsExpanded="True"> <Grid RowDefinitions="Auto,10,Auto" ColumnDefinitions="Auto,10,Auto,5,Auto,20,Auto,10,150,5,Auto,20,Auto,10,150,5,Auto"> diff --git a/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml b/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml index c2ddb1a..bb9b1d2 100644 --- a/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml +++ b/UVtools.WPF/Controls/Calibrators/CalibrateXYZAccuracyControl.axaml @@ -7,17 +7,13 @@ <Grid ColumnDefinitions="Auto,10,380"> <StackPanel Spacing="10"> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 1: Generate and print test model" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Step 1: Generate and print test model" + IsExpanded="True"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto" - ColumnDefinitions="Auto,10,150,5,Auto,20,Auto,10,150,5,Auto" - > + ColumnDefinitions="Auto,10,150,5,Auto,20,Auto,10,150,5,Auto"> <TextBlock Grid.Row="0" Grid.Column="0" @@ -376,12 +372,9 @@ </Grid> </Expander> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 2: Validate the printed model with your measures" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Step 2: Validate the printed model with your measures" + IsExpanded="True"> <StackPanel Spacing="10"> @@ -480,12 +473,9 @@ </Expander> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Step 3: Save a resize profile with the results" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Step 3: Save a resize profile with the results" + IsExpanded="True"> <Grid ColumnDefinitions="Auto,10,440,5,Auto,5,Auto"> <TextBlock VerticalAlignment="Center" diff --git a/UVtools.WPF/Controls/Tools/ToolMorphControl.axaml b/UVtools.WPF/Controls/Tools/ToolMorphControl.axaml index 683b3f9..edd99ff 100644 --- a/UVtools.WPF/Controls/Tools/ToolMorphControl.axaml +++ b/UVtools.WPF/Controls/Tools/ToolMorphControl.axaml @@ -63,12 +63,9 @@ </Grid> - <Expander Margin="0,10,0,0"> - <Expander.Header> - <TextBlock Text="Kernel - Advanced options (Click to expand)" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Kernel - Advanced options (Click to expand)" + Margin="0,10,0,0"> <uc:KernelControl Name="KernelCtrl" Margin="0,10,0,0" diff --git a/UVtools.WPF/Controls/Tools/ToolPixelArithmeticControl.axaml b/UVtools.WPF/Controls/Tools/ToolPixelArithmeticControl.axaml index 40788d1..fcd5b4b 100644 --- a/UVtools.WPF/Controls/Tools/ToolPixelArithmeticControl.axaml +++ b/UVtools.WPF/Controls/Tools/ToolPixelArithmeticControl.axaml @@ -5,7 +5,7 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="UVtools.WPF.Controls.Tools.ToolPixelArithmeticControl"> - <StackPanel Spacing="10"> + <Grid RowDefinitions="Auto,10,Auto"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto" ColumnDefinitions="Auto,10,Auto,20,Auto,10,Auto,20,Auto,10,Auto"> @@ -157,17 +157,21 @@ </Grid> - <Border> - <Border.IsVisible> + <Expander Grid.Row="2" + Header="Pattern" + IsExpanded="True"> + <!-- + <Border.IsVisible> <MultiBinding Converter="{x:Static BoolConverters.And}"> <Binding Path="Operation.IsUsePatternVisible" /> <Binding Path="Operation.UsePattern"/> </MultiBinding> </Border.IsVisible> +--> - <StackPanel Spacing="10"> + <StackPanel Spacing="10" IsEnabled="{Binding Operation.UsePattern}"> - <TextBlock Text="Pattern:" FontWeight="Bold"/> + <!-- <TextBlock Text="Pattern:" FontWeight="Bold"/> --> <StackPanel Orientation="Horizontal" Spacing="10"> <TextBlock @@ -419,8 +423,8 @@ </Grid> </StackPanel> - </Border> + </Expander> - </StackPanel> + </Grid> </UserControl> diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj index 6d6bc26..4e65c84 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.19.0</Version> + <Version>2.19.1</Version> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> @@ -31,7 +31,7 @@ <PackageReference Include="Avalonia.Diagnostics" Version="0.10.7" /> <PackageReference Include="Emgu.CV.runtime.windows" Version="4.5.3.4721" /> <PackageReference Include="MessageBox.Avalonia" Version="1.5.1" /> - <PackageReference Include="ThemeEditor.Controls.ColorPicker" Version="0.10.6" /> + <PackageReference Include="ThemeEditor.Controls.ColorPicker" Version="0.10.7" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\UVtools.AvaloniaControls\UVtools.AvaloniaControls.csproj" /> diff --git a/UVtools.WPF/UserSettings.cs b/UVtools.WPF/UserSettings.cs index a5b3df2..2ac29c6 100644 --- a/UVtools.WPF/UserSettings.cs +++ b/UVtools.WPF/UserSettings.cs @@ -34,6 +34,7 @@ namespace UVtools.WPF private bool _startMaximized = true; private bool _checkForUpdatesOnStartup = true; private bool _loadDemoFileOnStartup = true; + private bool _windowsCanResize; private bool _windowsTakeIntoAccountScreenScaling = true; private ushort _windowsHorizontalMargin = 100; private ushort _windowsVerticalMargin = 60; @@ -68,6 +69,12 @@ namespace UVtools.WPF set => RaiseAndSetIfChanged(ref _loadDemoFileOnStartup, value); } + public bool WindowsCanResize + { + get => _windowsCanResize; + set => RaiseAndSetIfChanged(ref _windowsCanResize, value); + } + public bool WindowsTakeIntoAccountScreenScaling { get => _windowsTakeIntoAccountScreenScaling; diff --git a/UVtools.WPF/Windows/MaterialManagerWindow.axaml b/UVtools.WPF/Windows/MaterialManagerWindow.axaml index 30873e4..a43ea62 100644 --- a/UVtools.WPF/Windows/MaterialManagerWindow.axaml +++ b/UVtools.WPF/Windows/MaterialManagerWindow.axaml @@ -13,12 +13,9 @@ <Grid RowDefinitions="Auto,Auto,Auto,*"> <Border Grid.Row="0" Padding="5"> - <Expander IsExpanded="True"> - <Expander.Header> - <TextBlock Text="Global statistics" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + Header="Global statistics" + IsExpanded="True"> <StackPanel> <!--<Button VerticalAlignment="Center" @@ -77,12 +74,9 @@ </Border> - <Expander Grid.Row="1" IsExpanded="False"> - <Expander.Header> - <TextBlock Text="Add new material" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander Grid.Row="1" + Header="Add new material" + IsExpanded="False"> <Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto" diff --git a/UVtools.WPF/Windows/SettingsWindow.axaml b/UVtools.WPF/Windows/SettingsWindow.axaml index 48ede09..e6e5e26 100644 --- a/UVtools.WPF/Windows/SettingsWindow.axaml +++ b/UVtools.WPF/Windows/SettingsWindow.axaml @@ -39,8 +39,15 @@ <StackPanel Orientation="Vertical"> <TextBlock Padding="10" Background="LightBlue" FontWeight="Bold" Text="Windows / dialogs"/> <StackPanel Margin="10" Orientation="Vertical" Spacing="10"> + + <CheckBox IsChecked="{Binding Settings.General.WindowsCanResize}" + ToolTip.Tip="Check this option if you have problems with content being cut on some windows, down-size the height by a bit and then expand to fix the content." + Content="Allow to resize the tool windows"/> + <CheckBox IsChecked="{Binding Settings.General.WindowsTakeIntoAccountScreenScaling}" Content="Take into account the screen scale factor to limit the dialogs windows maximum size"/> + + <Grid RowDefinitions="Auto,10,Auto" ColumnDefinitions="Auto,10,150,5,Auto"> diff --git a/UVtools.WPF/Windows/ToolWindow.axaml b/UVtools.WPF/Windows/ToolWindow.axaml index 15f20dc..e8959f5 100644 --- a/UVtools.WPF/Windows/ToolWindow.axaml +++ b/UVtools.WPF/Windows/ToolWindow.axaml @@ -18,13 +18,9 @@ Background="WhiteSmoke" Padding="10" IsVisible="{Binding Description, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> - <Expander IsExpanded="{Binding Settings.General.ExpandDescriptions}"> - <Expander.Header> - <TextBlock Text="Description (Click to toggle)" - Width="{Binding ExpanderHeaderMaxWidth}" - FontWeight="Bold" - Cursor="Hand"/> - </Expander.Header> + <Expander + IsExpanded="{Binding Settings.General.ExpandDescriptions}" + Header="Description (Click to toggle)"> <TextBox Classes="TransparentReadOnly" HorizontalAlignment="Left" Width="Infinity" diff --git a/UVtools.WPF/Windows/ToolWindow.axaml.cs b/UVtools.WPF/Windows/ToolWindow.axaml.cs index 5d2438f..cd7a6fe 100644 --- a/UVtools.WPF/Windows/ToolWindow.axaml.cs +++ b/UVtools.WPF/Windows/ToolWindow.axaml.cs @@ -33,7 +33,6 @@ namespace UVtools.WPF.Windows public ToolControl ToolControl; private string _description; private double _descriptionMaxWidth; - private double _expanderHeaderMaxWidth = double.NaN; private double _profileBoxMaxWidth = double.NaN; private bool _layerRangeVisible = true; private bool _layerRangeSync; @@ -77,12 +76,6 @@ namespace UVtools.WPF.Windows set => RaiseAndSetIfChanged(ref _descriptionMaxWidth, value); } - public double ExpanderHeaderMaxWidth - { - get => _expanderHeaderMaxWidth; - set => RaiseAndSetIfChanged(ref _expanderHeaderMaxWidth, value); - } - public double ProfileBoxMaxWidth { get => _profileBoxMaxWidth; @@ -663,8 +656,6 @@ namespace UVtools.WPF.Windows //RaisePropertyChanged(nameof(IsContentVisible)); //RaisePropertyChanged(nameof(IsROIVisible)); - - // Ensure the description don't stretch window /*DispatcherTimer.Run(() => { @@ -706,7 +697,6 @@ namespace UVtools.WPF.Windows base.OnOpened(e); var profileTextBox = this.FindControl<TextBox>("ProfileName"); DescriptionMaxWidth = Math.Max(Bounds.Width, ToolControl.Bounds.Width) - 20; - ExpanderHeaderMaxWidth = DescriptionMaxWidth - 40; ProfileBoxMaxWidth = profileTextBox.Bounds.Width; Height = MaxHeight; @@ -721,6 +711,9 @@ namespace UVtools.WPF.Windows (int)(App.MainWindow.Position.X + App.MainWindow.Width / 2 - Width / 2), App.MainWindow.Position.Y + 20 ); + + CanResize = Settings.General.WindowsCanResize; + return false; }, TimeSpan.FromMilliseconds(1)); } |