Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c4ab647
Add initial Avalonia UI port
Apr 29, 2026
ae62a8a
Polish Avalonia UI parity
Apr 30, 2026
2820e2d
Run CI on Avalonia branch and PRs
Apr 30, 2026
8b7ce49
Grant workflow contents write permission
Apr 30, 2026
2ad5fc9
Publish Avalonia artifacts in CI
Apr 30, 2026
41d387c
Scale down main Avalonia UI
Apr 30, 2026
0ce6c7d
Shrink main Avalonia UI by 20 percent
Apr 30, 2026
d8e52f4
Revert "Shrink main Avalonia UI by 20 percent"
Apr 30, 2026
9866e7f
Refine Avalonia main window layout
codex Apr 30, 2026
8a63b2a
Package macOS Avalonia build as app bundle
codex Apr 30, 2026
3ea51c1
Ad-hoc sign macOS app bundle
codex Apr 30, 2026
34fb8b9
Add macOS app bundle icon
codex May 1, 2026
c8fca2f
Compact Avalonia submenu layouts
codex May 1, 2026
3b8fe3b
Tighten Options path and login rows
codex May 1, 2026
b96896d
Refine Avalonia window layouts
codex May 1, 2026
db00ae4
Refine dark mode styling
codex May 1, 2026
2d5ce81
Add versioned release publishing
codex May 1, 2026
93da37a
Prepare Avalonia release v0.1.1
May 2, 2026
3064452
Prepare Avalonia v0.1.2 release
May 2, 2026
dc26ccf
Prepare Avalonia v0.1.3 release
May 3, 2026
d05ec96
Prepare Avalonia v0.1.4 release
May 3, 2026
cd17cef
Update release artifact naming
May 3, 2026
f6a8893
Release 0.1.5 UI refresh
May 3, 2026
0feac87
Remove obsolete TODO
May 3, 2026
99b7ac6
Release 0.1.6 UI refinements
May 3, 2026
4123fcd
Rename build artifacts to MPF.UI prefix
May 3, 2026
ab585fb
Prepare Avalonia UI 0.1.7
May 3, 2026
a803112
Prepare Avalonia UI 0.1.8
May 3, 2026
9473e3f
Cleanup repository for PR, use SabreTools-style build processes
Deterous May 6, 2026
1f79c7f
Merge branch 'SabreTools:master' into avalonia
Deterous May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 200 additions & 0 deletions MPF.Avalonia/App.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:MPF.Avalonia.Controls"
xmlns:fluent="using:Avalonia.Themes.Fluent"
xmlns:windows="using:MPF.Avalonia.Windows"
x:Class="MPF.Avalonia.App"
RequestedThemeVariant="Light">
<Application.Styles>
<FluentTheme DensityStyle="Compact">
<FluentTheme.Palettes>
<fluent:ColorPaletteResources x:Key="Light" Accent="#0078D4" />
<fluent:ColorPaletteResources x:Key="Dark" Accent="#0078D4" />
</FluentTheme.Palettes>
</FluentTheme>
<Style Selector="Window">
<Setter Property="Background" Value="{DynamicResource AppBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="FontSize" Value="12.5" />
</Style>
<Style Selector="TextBlock[FontWeight=Bold]">
<Setter Property="Foreground" Value="{DynamicResource HeadingForegroundBrush}" />
</Style>
<Style Selector="Button">
<Setter Property="MinHeight" Value="28" />
<Setter Property="Margin" Value="2" />
<Setter Property="Padding" Value="14,6" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="Button:pointerover">
<Setter Property="Background" Value="{DynamicResource ButtonHoverBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonHoverBorderBrush}" />
</Style>
<Style Selector="Button:pressed">
<Setter Property="Background" Value="{DynamicResource ButtonPressedBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonPressedBorderBrush}" />
</Style>
<Style Selector="Button:disabled">
<Setter Property="Background" Value="{DynamicResource ButtonDisabledBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDisabledBorderBrush}" />
</Style>
<Style Selector="Menu">
<Setter Property="Background" Value="{DynamicResource MenuBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
</Style>
<Style Selector="MenuItem">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="MenuItem:pointerover">
<Setter Property="Background" Value="{DynamicResource MenuItemHoverBackgroundBrush}" />
</Style>
<Style Selector="MenuItem:selected">
<Setter Property="Background" Value="{DynamicResource MenuItemHoverBackgroundBrush}" />
</Style>
<Style Selector="MenuItem:open">
<Setter Property="Background" Value="{DynamicResource MenuItemPressedBackgroundBrush}" />
</Style>
<Style Selector="MenuItem:pressed">
<Setter Property="Background" Value="{DynamicResource MenuItemPressedBackgroundBrush}" />
</Style>
<Style Selector="MenuItem:disabled">
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
</Style>
<Style Selector="MenuFlyoutPresenter">
<Setter Property="Background" Value="{DynamicResource MenuSubMenuBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuSubMenuBorderBrush}" />
</Style>
<Style Selector="ContextMenu">
<Setter Property="Background" Value="{DynamicResource MenuSubMenuBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuSubMenuBorderBrush}" />
</Style>
<Style Selector="MenuItem /template/ Border#PART_PopupBorder">
<Setter Property="Background" Value="{DynamicResource MenuSubMenuBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource MenuSubMenuBorderBrush}" />
</Style>
<Style Selector="TextBox">
<Setter Property="MinHeight" Value="23" />
<Setter Property="Padding" Value="6,2" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource PanelBorderBrush}" />
</Style>
<Style Selector="ComboBox">
<Setter Property="MinHeight" Value="23" />
<Setter Property="Padding" Value="8,0,4,0" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource AppForegroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource PanelBorderBrush}" />
</Style>
<Style Selector="controls|MeasuredDropDownComboBox /template/ ToggleButton#DropDownButton">
<Setter Property="Padding" Value="0" />
<Setter Property="MinWidth" Value="24" />
<Setter Property="Width" Value="24" />
</Style>
<Style Selector="controls|MeasuredDropDownComboBox /template/ PathIcon">
<Setter Property="Margin" Value="0" />
<Setter Property="Width" Value="12" />
<Setter Property="Height" Value="12" />
</Style>
<Style Selector="CheckBox">
<Setter Property="MinHeight" Value="23" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style Selector="CheckBox /template/ Border#NormalRectangle">
<Setter Property="Width" Value="15" />
<Setter Property="Height" Value="15" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="CheckBox /template/ Viewbox">
<Setter Property="Width" Value="15" />
<Setter Property="Height" Value="15" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="Slider.default-speed-slider /template/ Thumb">
<Setter Property="Width" Value="20" />
<Setter Property="Height" Value="20" />
<Setter Property="MinWidth" Value="20" />
<Setter Property="MinHeight" Value="20" />
</Style>
<Style Selector="TabItem">
<Setter Property="FontSize" Value="14.5" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="10,2,10,6" />
</Style>
<Style Selector="TabControl">
<Setter Property="Margin" Value="0,3,0,0" />
</Style>
<Style Selector="TabControl /template/ TabStrip">
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="TabControl /template/ TabStrip /template/ ItemsPresenter">
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="Expander /template/ ToggleButton">
<Setter Property="Background" Value="{DynamicResource PanelBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource PanelBorderBrush}" />
</Style>
<Style Selector="Expander /template/ ToggleButton:pointerover">
<Setter Property="Background" Value="{DynamicResource PanelBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource PanelBorderBrush}" />
</Style>
<Style Selector="Expander /template/ ToggleButton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource PanelBackgroundBrush}" />
</Style>
<Style Selector="Expander /template/ ToggleButton:pointerover /template/ Border">
<Setter Property="Background" Value="{DynamicResource PanelBackgroundBrush}" />
</Style>
<Style Selector="Expander /template/ ToggleButton:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{DynamicResource PanelBackgroundBrush}" />
</Style>
<Style Selector="Expander /template/ ToggleButton:pressed">
<Setter Property="Background" Value="{DynamicResource PanelBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource PanelBorderBrush}" />
</Style>
<Style Selector="Expander#LogPanel /template/ ToggleButton">
<Setter Property="MinHeight" Value="22" />
<Setter Property="Padding" Value="0,2" />
</Style>
</Application.Styles>

<Application.Resources>
<SolidColorBrush x:Key="AppBackgroundBrush">#FFF5F5F5</SolidColorBrush>
<SolidColorBrush x:Key="AppForegroundBrush">#FF111111</SolidColorBrush>
<SolidColorBrush x:Key="HeadingForegroundBrush">#FF111111</SolidColorBrush>
<SolidColorBrush x:Key="PanelBackgroundBrush">#FFFFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="PanelBorderBrush">#FFD0D0D0</SolidColorBrush>
<SolidColorBrush x:Key="ButtonBackgroundBrush">#FFE5E5E5</SolidColorBrush>
<SolidColorBrush x:Key="ButtonHoverBackgroundBrush">#FFEDEDED</SolidColorBrush>
<SolidColorBrush x:Key="ButtonPressedBackgroundBrush">#FFD8D8D8</SolidColorBrush>
<SolidColorBrush x:Key="ButtonDisabledBackgroundBrush">#FFE2E2E2</SolidColorBrush>
<SolidColorBrush x:Key="ButtonBorderBrush">#FFB8B8B8</SolidColorBrush>
<SolidColorBrush x:Key="ButtonHoverBorderBrush">#FF9F9F9F</SolidColorBrush>
<SolidColorBrush x:Key="ButtonPressedBorderBrush">#FF8E8E8E</SolidColorBrush>
<SolidColorBrush x:Key="ButtonDisabledBorderBrush">#FFD2D2D2</SolidColorBrush>
<SolidColorBrush x:Key="DisabledForegroundBrush">#FF8A8A8A</SolidColorBrush>
<SolidColorBrush x:Key="MenuBackgroundBrush">#00FFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MenuSubMenuBackgroundBrush">#FFFFFFFF</SolidColorBrush>
<SolidColorBrush x:Key="MenuSubMenuBorderBrush">#FFD0D0D0</SolidColorBrush>
<SolidColorBrush x:Key="MenuItemHoverBackgroundBrush">#FFEDEDED</SolidColorBrush>
<SolidColorBrush x:Key="MenuItemPressedBackgroundBrush">#FFD8D8D8</SolidColorBrush>
<SolidColorBrush x:Key="TitleBarButtonHoverBrush">#FFE5E5E5</SolidColorBrush>
<SolidColorBrush x:Key="TitleBarButtonPressedBrush">#FFD0D0D0</SolidColorBrush>
<SolidColorBrush x:Key="LogBackgroundBrush">#FF202020</SolidColorBrush>
<SolidColorBrush x:Key="LogForegroundBrush">#FFF0F0F0</SolidColorBrush>
</Application.Resources>
</Application>
30 changes: 30 additions & 0 deletions MPF.Avalonia/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using MPF.Frontend;
using MPF.Frontend.Tools;
using MPF.Avalonia.Services;
using MPF.Avalonia.Windows;

namespace MPF.Avalonia
{
public partial class App : Application
{
public override void Initialize()
{
Name = "MPF";
AvaloniaXamlLoader.Load(this);
StringResourceLoader.Load(Resources, InterfaceLanguage.English);
}

public override void OnFrameworkInitializationCompleted()
{
ThemeService.ApplySystemTheme(Resources, OptionsLoader.LoadFromConfig());

if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = new MainWindow();

base.OnFrameworkInitializationCompleted();
}
}
}
Loading