Skip to content

Commit

Permalink
Port to Avalonia
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndysc committed Mar 24, 2024
1 parent 645e6c9 commit 1f79421
Show file tree
Hide file tree
Showing 182 changed files with 5,974 additions and 2,992 deletions.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/add_example_app.md

This file was deleted.

3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Does it happen in WPF version?**
If possible, please try to reproduce the bug in the [WPF version](https://github.com/miroiu/nodify). If it also happen in WPF's, it has to be fixed in the upstream and then it can be merged to this Avalonia port.

**Additional context**
Add any other context about the problem here.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/documentation.md

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: windows-latest
runs-on: ubuntu-latest

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
create-release:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Save tag version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
publish:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,4 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/
.idea
20 changes: 14 additions & 6 deletions Examples/Nodify.Calculator/App.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<Application x:Class="Nodify.Calculator.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
x:Class="Nodify.Calculator.App"
RequestedThemeVariant="Dark">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Nodify;component/Themes/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/Nodify.Shared;component/Themes/Icons.xaml" />
<ResourceDictionary Source="pack://application:,,,/Nodify.Shared;component/Themes/Dark.xaml" />
<ResourceInclude Source="avares://Nodify.Shared/Themes/Icons.xaml" />
<ResourceInclude Source="avares://Nodify.Shared/Themes/Generic.xaml" />
<ResourceInclude Source="avares://Nodify.Shared/Themes/Dark.xaml" />
<ResourceInclude Source="avares://Nodify/Themes/Generic.xaml" />
<ResourceInclude Source="avares://Nodify/Themes/Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

<Application.Styles>
<FluentTheme DensityStyle="Compact"/>
</Application.Styles>
</Application>
14 changes: 14 additions & 0 deletions Examples/Nodify.Calculator/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,19 @@ namespace Nodify.Calculator
/// </summary>
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}

base.OnFrameworkInitializationCompleted();
}
}
}
2 changes: 1 addition & 1 deletion Examples/Nodify.Calculator/CalculatorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private void GroupSelectedOperations()
Operations.Add(new OperationGroupViewModel
{
Title = "Operations",
Location = bounding.Location,
Location = bounding.Position,
GroupSize = new Size(bounding.Width, bounding.Height)
});
}
Expand Down
Loading

0 comments on commit 1f79421

Please sign in to comment.