first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
using Avalonia.Controls;
namespace Nitrox.Launcher.Views.Abstract;
public abstract class ModalBase : Window
{
protected override void OnInitialized() => this.ApplyOsWindowStyling();
}

View File

@@ -0,0 +1,7 @@
using Avalonia.Controls;
using Nitrox.Launcher.ViewModels.Abstract;
namespace Nitrox.Launcher.Views.Abstract;
public abstract class RoutableViewBase<TViewModel> : UserControl
where TViewModel : RoutableViewModelBase;

View File

@@ -0,0 +1,21 @@
using System;
using Avalonia.Controls;
using Nitrox.Launcher.Models.Design;
using Nitrox.Launcher.ViewModels.Abstract;
namespace Nitrox.Launcher.Views.Abstract;
public abstract class WindowEx<T> : Window where T : ViewModelBase
{
protected override void OnInitialized()
{
this.ApplyOsWindowStyling();
// On Linux systems, Avalonia has trouble allowing windows to resize without "decorations". So we enable it in full, but hide the custom titlebar as it'll look bad.
if (OperatingSystem.IsLinux())
{
SystemDecorations = SystemDecorations.Full;
NitroxAttached.SetUseCustomTitleBar(this, false);
}
}
}