diff --git a/PantherByte/App.axaml b/PantherByte/App.axaml index ad6d724..e931df4 100644 --- a/PantherByte/App.axaml +++ b/PantherByte/App.axaml @@ -12,4 +12,11 @@ + + + 0 + + + + \ No newline at end of file diff --git a/PantherByte/App.axaml.cs b/PantherByte/App.axaml.cs index 5d0e2a2..5ce49bb 100644 --- a/PantherByte/App.axaml.cs +++ b/PantherByte/App.axaml.cs @@ -31,7 +31,9 @@ public partial class App : Application { // Avoid duplicate validations from both Avalonia and the CommunityToolkit. // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins DisableAvaloniaDataAnnotationValidation(); - desktop.MainWindow = new MainWindow(new MainWindowViewModel()); + desktop.MainWindow = new MainWindow { + DataContext = new MainWindowViewModel() + }; var services = new ServiceCollection(); services.AddSingleton(x => new FileService(desktop.MainWindow)); diff --git a/PantherByte/ViewModels/MainWindowViewModel.cs b/PantherByte/ViewModels/MainWindowViewModel.cs index 0457dac..42f1d08 100644 --- a/PantherByte/ViewModels/MainWindowViewModel.cs +++ b/PantherByte/ViewModels/MainWindowViewModel.cs @@ -153,6 +153,8 @@ public partial class MainWindowViewModel : ViewModelBase { FileName = args[0], RedirectStandardOutput = true, RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true }; info.ArgumentList.AddRange(args[1..]); diff --git a/PantherByte/Views/MainWindow.axaml b/PantherByte/Views/MainWindow.axaml index 5c61938..37ecb99 100644 --- a/PantherByte/Views/MainWindow.axaml +++ b/PantherByte/Views/MainWindow.axaml @@ -11,7 +11,8 @@ TransparencyLevelHint="AcrylicBlur" Background="Transparent" SizeToContent="WidthAndHeight" - CanMaximize="False" + ExtendClientAreaToDecorationsHint="True" + CanResize="False" WindowStartupLocation="CenterScreen"> @@ -27,13 +28,13 @@ + TintOpacity="0.5" + MaterialOpacity="0.5"/> (this, static (w, m) => { diff --git a/PantherByte/Views/ProgressWindow.axaml b/PantherByte/Views/ProgressWindow.axaml index 3ce0e41..ade4563 100644 --- a/PantherByte/Views/ProgressWindow.axaml +++ b/PantherByte/Views/ProgressWindow.axaml @@ -7,7 +7,7 @@ x:Class="PantherByte.Views.ProgressWindow" x:DataType="vm:ProgressWindowViewModel" Title="Loading..." - TransparencyLevelHint="AcrylicBlur" + Background="Gray" SizeToContent="WidthAndHeight" CanMaximize="False" WindowStartupLocation="CenterOwner"> @@ -28,17 +28,18 @@ + Margin="5" + BorderThickness="0" + Background="Transparent"> + More information... - diff --git a/PantherByte/Views/ProgressWindow.axaml.cs b/PantherByte/Views/ProgressWindow.axaml.cs index 230aeff..147e165 100644 --- a/PantherByte/Views/ProgressWindow.axaml.cs +++ b/PantherByte/Views/ProgressWindow.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; using PantherByte.ViewModels; namespace PantherByte.Views; @@ -16,5 +14,7 @@ public partial class ProgressWindow : Window { await vm.RunProcessAsync(); }; + + StdOutText.SizeChanged += (_, _) => ScrollView.ScrollToEnd(); } }