Skip to content

Commit db510af

Browse files
committed
Update to rc1.1
1 parent 5b35d96 commit db510af

File tree

9 files changed

+21
-86
lines changed

9 files changed

+21
-86
lines changed

Directory.Build.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66
<PropertyGroup>
77
<VersionPrefix>11.0.0</VersionPrefix>
8-
<VersionSuffix>preview8.1</VersionSuffix>
8+
<VersionSuffix>rc1.1</VersionSuffix>
99
<Authors>Wiesław Šoltés</Authors>
1010
<Company>Wiesław Šoltés</Company>
1111
<Description>A multi-platform data driven 2D diagram editor.</Description>
@@ -32,11 +32,11 @@
3232
<XUnitAbstractionsVersion>2.0.3</XUnitAbstractionsVersion>
3333
<MicrosoftNETTestSdkVersion>16.2.0</MicrosoftNETTestSdkVersion>
3434
<SkiaSharpVersion>2.88.3</SkiaSharpVersion>
35-
<SvgSkiaVersion>0.6.0-preview8.2</SvgSkiaVersion>
36-
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
37-
<AvaloniaXamlBehaviorsVersion>11.0.0-preview8</AvaloniaXamlBehaviorsVersion>
38-
<AvaloniaControlsPanAndZoomVersion>11.0.0-preview8</AvaloniaControlsPanAndZoomVersion>
39-
<ThemeEditorControlsColorPickerVersion>11.0.0-preview8</ThemeEditorControlsColorPickerVersion>
40-
<DockAvaloniaVersion>11.0.0-preview8.1</DockAvaloniaVersion>
35+
<SvgSkiaVersion>0.6.0-rc1.1</SvgSkiaVersion>
36+
<AvaloniaVersion>11.0.0-rc1.1</AvaloniaVersion>
37+
<AvaloniaXamlBehaviorsVersion>11.0.0-rc1.1</AvaloniaXamlBehaviorsVersion>
38+
<AvaloniaControlsPanAndZoomVersion>11.0.0-rc1.1</AvaloniaControlsPanAndZoomVersion>
39+
<ThemeEditorControlsColorPickerVersion>11.0.0-rc1.1</ThemeEditorControlsColorPickerVersion>
40+
<DockAvaloniaVersion>11.0.0-rc1.1</DockAvaloniaVersion>
4141
</PropertyGroup>
4242
</Project>

samples/Demo.Base/Themes/Themes.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource SystemChromeMediumLowColor}" />
1111
<Color x:Key="SystemAltMediumLowColor">Transparent</Color>
1212
<SolidColorBrush x:Key="SystemControlBackgroundAltMediumLowBrush" Color="{StaticResource SystemAltMediumLowColor}" />
13-
<StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
13+
<SolidColorBrush x:Key="TextControlBackground" Color="{StaticResource SystemAltMediumLowColor}" />
1414
<SolidColorBrush x:Key="AcrylicFallbackColor">#E2E2E2</SolidColorBrush>
1515
<GridLength x:Key="SliderPreContentMargin">3</GridLength>
1616
<GridLength x:Key="SliderPostContentMargin">3</GridLength>
@@ -32,7 +32,7 @@
3232
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource SystemChromeMediumLowColor}" />
3333
<Color x:Key="SystemAltMediumLowColor">Transparent</Color>
3434
<SolidColorBrush x:Key="SystemControlBackgroundAltMediumLowBrush" Color="{StaticResource SystemAltMediumLowColor}" />
35-
<StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
35+
<SolidColorBrush x:Key="TextControlBackground" Color="{StaticResource SystemAltMediumLowColor}" />
3636
<SolidColorBrush x:Key="AcrylicFallbackColor">#1F1F1F</SolidColorBrush>
3737
<GridLength x:Key="SliderPreContentMargin">3</GridLength>
3838
<GridLength x:Key="SliderPostContentMargin">3</GridLength>

samples/Demo.Base/ViewModels/ViewModelBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Demo.ViewModels;
44

5-
[ObservableObject]
6-
public partial class ViewModelBase
5+
public partial class ViewModelBase : ObservableObject
6+
77
{
8-
}
8+
}

src/Core2D/AppState.cs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
using System.Linq;
55
using System.Reflection;
66
using Autofac;
7-
using Avalonia;
8-
using Avalonia.Platform;
97
using Core2D.Configuration.Windows;
108
using Core2D.Json;
119
using Core2D.Model;
@@ -123,21 +121,11 @@ private void InitializeEditor()
123121
Editor.CurrentPathTool = Editor.PathTools.FirstOrDefault(t => t.Title == "Line");
124122
Editor.IsToolIdle = true;
125123

126-
var runtimePlatform = AvaloniaLocator.Current.GetService<IRuntimePlatform>();
127-
var windowingPlatform = AvaloniaLocator.Current.GetService<IWindowingPlatform>();
128-
var platformRenderInterface = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>();
129-
if (windowingPlatform is { } && platformRenderInterface is { } && runtimePlatform is { })
130-
{
131-
var windowingSubsystemName = windowingPlatform.GetType().Assembly.GetName().Name;
132-
var renderingSubsystemName = platformRenderInterface.GetType().Assembly.GetName().Name;
133-
var runtimeInfo = runtimePlatform.GetRuntimeInfo();
134-
var aboutInfo = CreateAboutInfo(ServiceProvider, runtimeInfo, windowingSubsystemName, renderingSubsystemName);
124+
Editor.AboutInfo = CreateAboutInfo(ServiceProvider);
135125

136-
Editor.AboutInfo = aboutInfo;
137-
}
138126
}
139127

140-
private AboutInfoViewModel CreateAboutInfo(IServiceProvider? serviceProvider, RuntimePlatformInfo runtimeInfo, string? windowingSubsystem, string? renderingSubsystem)
128+
private AboutInfoViewModel CreateAboutInfo(IServiceProvider? serviceProvider)
141129
{
142130
return new AboutInfoViewModel(serviceProvider)
143131
{
@@ -146,10 +134,6 @@ private AboutInfoViewModel CreateAboutInfo(IServiceProvider? serviceProvider, Ru
146134
Description = "A multi-platform data driven 2D diagram editor.",
147135
Copyright = "Copyright (c) Wiesław Šoltés. All rights reserved.",
148136
License = "Licensed under the MIT License. See LICENSE file in the project root for full license information.",
149-
IsDesktop = runtimeInfo.IsDesktop,
150-
IsMobile = runtimeInfo.IsMobile,
151-
WindowingSubsystemName = windowingSubsystem,
152-
RenderingSubsystemName = renderingSubsystem
153137
};
154138
}
155139

src/Core2D/Behaviors/CancelContextMenuBehavior.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected override void OnAttached()
3232

3333
if ((ContextMenu ?? AssociatedObject?.ContextMenu) is { } contextMenu)
3434
{
35-
contextMenu.ContextMenuOpening += ContextMenu_ContextMenuOpening;
35+
contextMenu.Opening += ContextMenu_ContextMenuOpening;
3636
}
3737
}
3838

@@ -42,12 +42,12 @@ protected override void OnDetaching()
4242

4343
if ((ContextMenu ?? AssociatedObject?.ContextMenu) is { } contextMenu)
4444
{
45-
contextMenu.ContextMenuOpening -= ContextMenu_ContextMenuOpening;
45+
contextMenu.Opening -= ContextMenu_ContextMenuOpening;
4646
}
4747
}
4848

4949
private void ContextMenu_ContextMenuOpening(object? sender, CancelEventArgs e)
5050
{
5151
e.Cancel = !IsEnabled;
5252
}
53-
}
53+
}

src/Core2D/Modules/Renderer/Avalonia/PathGeometryConverter.cs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ namespace Core2D.Modules.Renderer.Avalonia;
1414

1515
public static class PathGeometryConverter
1616
{
17-
private static T? GetService<T>(this A.IAvaloniaDependencyResolver resolver) => (T?) resolver.GetService(typeof (T));
18-
19-
private static AP.IPlatformRenderInterface? Factory => A.AvaloniaLocator.Current.GetService<AP.IPlatformRenderInterface>();
20-
2117
private static A.Point ToPoint(this PointShapeViewModel point) => new(point.X, point.Y);
2218

2319
private static A.Size ToSize(this PathSizeViewModel size) => new( size.Width, size.Height);
@@ -26,11 +22,6 @@ public static class PathGeometryConverter
2622

2723
public static AM.Geometry? ToGeometryImpl(PathShapeViewModel pathShape, bool isFilled)
2824
{
29-
var factory = Factory;
30-
if (factory is null)
31-
{
32-
return null;
33-
}
3425
var geometry = new AM.StreamGeometry();
3526
using var context = geometry.Open();
3627

@@ -110,11 +101,6 @@ public static class PathGeometryConverter
110101
}
111102
public static AM.Geometry? ToGeometryImpl(EllipseShapeViewModel ellipse)
112103
{
113-
var factory = Factory;
114-
if (factory is null)
115-
{
116-
return null;
117-
}
118104
if (ellipse.TopLeft is null || ellipse.BottomRight is null)
119105
{
120106
return null;
@@ -130,11 +116,6 @@ public static class PathGeometryConverter
130116

131117
public static AM.Geometry? ToGeometryImpl(ArcShapeViewModel arc)
132118
{
133-
var factory = Factory;
134-
if (factory is null)
135-
{
136-
return null;
137-
}
138119
if (arc.Point1 is null || arc.Point2 is null || arc.Point3 is null || arc.Point4 is null)
139120
{
140121
return null;
@@ -161,11 +142,6 @@ public static class PathGeometryConverter
161142

162143
public static AM.Geometry? ToGeometryImpl(CubicBezierShapeViewModel cubicBezier)
163144
{
164-
var factory = Factory;
165-
if (factory is null)
166-
{
167-
return null;
168-
}
169145
if (cubicBezier.Point1 is null || cubicBezier.Point2 is null || cubicBezier.Point3 is null || cubicBezier.Point4 is null)
170146
{
171147
return null;
@@ -185,11 +161,6 @@ public static class PathGeometryConverter
185161

186162
public static AM.Geometry? ToGeometryImpl(QuadraticBezierShapeViewModel quadraticBezier)
187163
{
188-
var factory = Factory;
189-
if (factory is null)
190-
{
191-
return null;
192-
}
193164
if (quadraticBezier.Point1 is null || quadraticBezier.Point2 is null || quadraticBezier.Point3 is null)
194165
{
195166
return null;

src/Core2D/Themes/Themes.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource SystemChromeMediumLowColor}" />
1111
<Color x:Key="SystemAltMediumLowColor">Transparent</Color>
1212
<SolidColorBrush x:Key="SystemControlBackgroundAltMediumLowBrush" Color="{StaticResource SystemAltMediumLowColor}" />
13-
<StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
13+
<SolidColorBrush x:Key="TextControlBackground" Color="{StaticResource SystemAltMediumLowColor}" />
1414
<SolidColorBrush x:Key="AcrylicFallbackColor">#E2E2E2</SolidColorBrush>
1515
<GridLength x:Key="SliderPreContentMargin">3</GridLength>
1616
<GridLength x:Key="SliderPostContentMargin">3</GridLength>
@@ -32,7 +32,7 @@
3232
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource SystemChromeMediumLowColor}" />
3333
<Color x:Key="SystemAltMediumLowColor">Transparent</Color>
3434
<SolidColorBrush x:Key="SystemControlBackgroundAltMediumLowBrush" Color="{StaticResource SystemAltMediumLowColor}" />
35-
<StaticResource x:Key="TextControlBackground" ResourceKey="SystemControlBackgroundAltMediumLowBrush" />
35+
<SolidColorBrush x:Key="TextControlBackground" Color="{StaticResource SystemAltMediumLowColor}" />
3636
<SolidColorBrush x:Key="AcrylicFallbackColor">#1F1F1F</SolidColorBrush>
3737
<GridLength x:Key="SliderPreContentMargin">3</GridLength>
3838
<GridLength x:Key="SliderPostContentMargin">3</GridLength>

src/Core2D/ViewModels/Editor/AboutInfoViewModel.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ public class AboutInfoViewModel : ViewModelBase
1616

1717
public string? License { get; set; }
1818

19-
public bool IsDesktop { get; set; }
20-
21-
public bool IsMobile { get; set; }
22-
23-
public string? WindowingSubsystemName { get; set; }
24-
25-
public string? RenderingSubsystemName { get; set; }
26-
2719
public AboutInfoViewModel(IServiceProvider? serviceProvider) : base(serviceProvider)
2820
{
2921
}
@@ -38,9 +30,5 @@ public override string ToString() =>
3830
$"{nameof(Version)}: {Version}{Environment.NewLine}" +
3931
$"{nameof(Description)}: {Description}{Environment.NewLine}" +
4032
$"{nameof(Copyright)}: {Copyright}{Environment.NewLine}" +
41-
$"{nameof(License)}: {License}{Environment.NewLine}" +
42-
$"{nameof(IsDesktop)}: {IsDesktop}{Environment.NewLine}" +
43-
$"{nameof(IsMobile)}: {IsMobile}{Environment.NewLine}" +
44-
$"{nameof(WindowingSubsystemName)}: {WindowingSubsystemName}{Environment.NewLine}" +
45-
$"{nameof(RenderingSubsystemName)}: {RenderingSubsystemName}{Environment.NewLine}";
33+
$"{nameof(License)}: {License}{Environment.NewLine}";
4634
}

src/Core2D/Views/Editor/AboutInfoView.axaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</Style>
1414
</UserControl.Styles>
1515
<Grid ColumnDefinitions="Auto,4,*"
16-
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"
16+
RowDefinitions="Auto,Auto,Auto,Auto,Auto"
1717
Margin="10">
1818
<Label Content="{Binding Title}"
1919
FontSize="18"
@@ -23,17 +23,9 @@
2323
<Label Content="Description" Grid.Column="0" Grid.Row="2" />
2424
<Label Content="Copyright" Grid.Column="0" Grid.Row="3" />
2525
<Label Content="License" Grid.Column="0" Grid.Row="4" />
26-
<Label Content="IsDesktop" Grid.Column="0" Grid.Row="6" />
27-
<Label Content="IsMobile" Grid.Column="0" Grid.Row="7" />
28-
<Label Content="WindowingSubsystem" Grid.Column="0" Grid.Row="12" />
29-
<Label Content="RenderingSubsystem" Grid.Column="0" Grid.Row="13" />
3026
<Label Content="{Binding Version}" Grid.Column="2" Grid.Row="1" />
3127
<Label Content="{Binding Description}" Grid.Column="2" Grid.Row="2" />
3228
<Label Content="{Binding Copyright}" Grid.Column="2" Grid.Row="3" />
3329
<Label Content="{Binding License}" Grid.Column="2" Grid.Row="4" />
34-
<Label Content="{Binding IsDesktop}" Grid.Column="2" Grid.Row="6" />
35-
<Label Content="{Binding IsMobile}" Grid.Column="2" Grid.Row="7" />
36-
<Label Content="{Binding WindowingSubsystemName}" Grid.Column="2" Grid.Row="12" />
37-
<Label Content="{Binding RenderingSubsystemName}" Grid.Column="2" Grid.Row="13" />
3830
</Grid>
3931
</UserControl>

0 commit comments

Comments
 (0)