Release 1.1.3: reveal faint nebula structure with human-readable preview modes
All checks were successful
Release AstroFrame / packages (push) Successful in 1m6s

This commit is contained in:
Elijah 2026-10-04 13:52:01 -07:00
parent 5ad7a6a79e
commit d3362c8341
15 changed files with 300 additions and 24 deletions

View file

@ -30,7 +30,7 @@ public sealed partial class MainWindow:Window
readonly DispatcherTimer memoryTimer=new(){Interval=TimeSpan.FromSeconds(1)};
StarInspector? starInspector;
readonly Border previewPanel,comparisonBorder,previewControls;
readonly ComboBox previewMode=new(){ItemsSource=new[]{"Frame view","Nebula view"},SelectedIndex=0,MinWidth=150};
readonly ComboBox previewMode=new(){ItemsSource=new[]{"Frame view","Nebula view","Asinh view","Color nebula"},SelectedIndex=0,MinWidth=150};
readonly Slider displayStretch=new(){Minimum=.08,Maximum=.40,Value=.18};
readonly StackPanel inspector=new(){Spacing=9};
readonly Grid previewWorkspace=new(){ColumnDefinitions=new("*,0"),Margin=new(0,8,0,6)};
@ -58,7 +58,8 @@ public sealed partial class MainWindow:Window
var resetStretch=Button("Reset");resetStretch.Padding=new(9,5);resetStretch.FontSize=11;resetStretch.VerticalAlignment=VerticalAlignment.Center;resetStretch.Click+=(_,_)=>displayStretch.Value=.18;Grid.SetColumn(resetStretch,1);stretchRow.Children.Add(resetStretch);Grid.SetRow(stretchRow,1);displayPanel.Children.Add(stretchRow);previewControls=new(){Child=displayPanel};
// Keep the native slider's input behavior; give its thumb a visible silver face and room for the full circle.
Styles.Add(new Style(x=>x.OfType<Slider>().Template().OfType<Avalonia.Controls.Primitives.Thumb>()){Setters={new Setter(Avalonia.Controls.Primitives.TemplatedControl.TemplateProperty,new FuncControlTemplate<Avalonia.Controls.Primitives.Thumb>((_,_)=>new Border{Width=20,Height=20,CornerRadius=new(10),Background=Palette.Accent,BorderBrush=Palette.Panel,BorderThickness=new(3),HorizontalAlignment=HorizontalAlignment.Center,VerticalAlignment=VerticalAlignment.Center}))}});
previewMode.SelectionChanged+=(_,_)=>{preview.Nebula=comparison.Nebula=previewMode.SelectedIndex==1;preview.RefreshDisplay();comparison.RefreshDisplay();};
previewMode.SelectionChanged+=(_,_)=>{preview.SetMode((PreviewMode)Math.Max(0,previewMode.SelectedIndex));comparison.SetMode((PreviewMode)Math.Max(0,previewMode.SelectedIndex));};
ToolTip.SetTip(previewMode,"Frame: original grayscale stretch. Nebula: smooth faint detail with less star dominance. Asinh: an alternative smooth stretch. Color: sky-neutralized Bayer RGB when available. Display options do not change analysis.");
displayStretch.PropertyChanged+=(_,e)=>{if(e.Property==Slider.ValueProperty){stretchValue.Text=displayStretch.Value.ToString("0.00");preview.Stretch=comparison.Stretch=displayStretch.Value;preview.RefreshDisplay();comparison.RefreshDisplay();}};
Title="AstroFrame";Width=1450;Height=940;MinWidth=1120;MinHeight=740;Background=Palette.Background;FontFamily="Inter";FontSize=13;
ExtendClientAreaToDecorationsHint=true;ExtendClientAreaChromeHints=Avalonia.Platform.ExtendClientAreaChromeHints.PreferSystemChrome;ExtendClientAreaTitleBarHeightHint=36;
@ -179,6 +180,8 @@ public sealed partial class MainWindow:Window
int index=Array.FindIndex(QualityChart.Metrics,m=>m.Name==name);
if(index<0)throw new ArgumentException("Unknown quality metric",nameof(name));metric.SelectedIndex=index;
}
public void CapturePreviewMode(int mode)
{if(mode<0||mode>3)throw new ArgumentOutOfRangeException(nameof(mode));previewMode.SelectedIndex=mode;}
public async Task SmokeTest(string report)
{
if(project==null)throw new InvalidOperationException("Project not loaded");