Upgraded to preview8

This commit is contained in:
Robert committed 2023-05-11 23:10:49 +02:00
1 parent 3c6d770ec2
commit bf6674e44f
24 files changed
+117 -113

No files matched your search

@@ -59,7 +59,7 @@ public class PlaybackViewModel : ActivatableViewModelBase
updateTimer.Start();
Disposable.Create(() =>
{
// updateTimer.Stop();
updateTimer.Stop();
_settingsService.GetSetting("ProfileEditor.RepeatTimeline", true).Value = _repeating && _repeatTimeline;
_settingsService.GetSetting("ProfileEditor.RepeatSegment", false).Value = _repeating && _repeatSegment;
}).DisposeWith(d);
@@ -179,12 +179,12 @@ public class PropertyGroupViewModel : PropertyViewModelBase, IDisposable
public void Dispose()
{
LayerPropertyGroup.VisibilityChanged -= LayerPropertyGroupOnVisibilityChanged;
foreach (ViewModelBase viewModelBase in Children)
while (Children.Any())
{
if (viewModelBase is IDisposable disposable)
if (Children[0] is IDisposable disposable)
disposable.Dispose();
Children.RemoveAt(0);
}
_keyframeSubscription.Dispose();
}
}
@@ -22,7 +22,6 @@ namespace Artemis.UI.Screens.Root;
public class RootViewModel : ActivatableViewModelBase, IScreen, IMainWindowProvider
{
private readonly IAssetLoader _assetLoader;
private readonly ICoreService _coreService;
private readonly IDebugService _debugService;
private readonly DefaultTitleBarViewModel _defaultTitleBarViewModel;
@@ -41,7 +40,6 @@ public class RootViewModel : ActivatableViewModelBase, IScreen, IMainWindowProvi
IMainWindowService mainWindowService,
IDebugService debugService,
IUpdateService updateService,
IAssetLoader assetLoader,
DefaultTitleBarViewModel defaultTitleBarViewModel,
ISidebarVmFactory sidebarVmFactory)
{
@@ -53,7 +51,6 @@ public class RootViewModel : ActivatableViewModelBase, IScreen, IMainWindowProvi
_windowService = windowService;
_debugService = debugService;
_updateService = updateService;
_assetLoader = assetLoader;
_defaultTitleBarViewModel = defaultTitleBarViewModel;
_sidebarVmFactory = sidebarVmFactory;
_lifeTime = (IClassicDesktopStyleApplicationLifetime) Application.Current!.ApplicationLifetime!;
@@ -11,7 +11,7 @@
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<StackPanel Margin="15" MaxWidth="800">
<Grid RowDefinitions="*,*" ColumnDefinitions="Auto,*,Auto">
<Image Grid.Column="0" Grid.RowSpan="2" Width="65" Height="65" VerticalAlignment="Center" Source="/Assets/Images/Logo/bow.png" Margin="0 0 20 0"/>
<Image Grid.Column="0" Grid.RowSpan="2" Width="65" Height="65" VerticalAlignment="Center" Source="/Assets/Images/Logo/bow.png" Margin="0 0 20 0" />
<TextBlock Grid.Row="0" Grid.Column="1" FontSize="36" VerticalAlignment="Bottom">
Artemis 2
</TextBlock>
@@ -52,9 +52,10 @@
Height="75"
Width="75"
Margin="0 0 15 0"
IsVisible="{CompiledBinding RobertProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
IsVisible="{CompiledBinding RobertProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
RenderOptions.BitmapInterpolationMode="HighQuality">
<Ellipse.Fill>
<ImageBrush Source="{CompiledBinding RobertProfileImage}" BitmapInterpolationMode="HighQuality" />
<ImageBrush Source="{CompiledBinding RobertProfileImage}" />
</Ellipse.Fill>
</Ellipse>
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
@@ -80,9 +81,10 @@
Height="75"
Width="75"
Margin="0 0 15 0"
IsVisible="{CompiledBinding DarthAffeProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
IsVisible="{CompiledBinding DarthAffeProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
RenderOptions.BitmapInterpolationMode="HighQuality">
<Ellipse.Fill>
<ImageBrush Source="{CompiledBinding DarthAffeProfileImage}" BitmapInterpolationMode="HighQuality" />
<ImageBrush Source="{CompiledBinding DarthAffeProfileImage}" />
</Ellipse.Fill>
</Ellipse>
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
@@ -108,9 +110,10 @@
Height="75"
Width="75"
Margin="0 0 15 0"
IsVisible="{CompiledBinding DrMeteorProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
IsVisible="{CompiledBinding DrMeteorProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
RenderOptions.BitmapInterpolationMode="HighQuality">
<Ellipse.Fill>
<ImageBrush Source="{CompiledBinding DrMeteorProfileImage}" BitmapInterpolationMode="HighQuality" />
<ImageBrush Source="{CompiledBinding DrMeteorProfileImage}" />
</Ellipse.Fill>
</Ellipse>
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
@@ -136,9 +139,10 @@
Height="75"
Width="75"
Margin="0 0 15 0"
IsVisible="{CompiledBinding KaiProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
IsVisible="{CompiledBinding KaiProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
RenderOptions.BitmapInterpolationMode="HighQuality">
<Ellipse.Fill>
<ImageBrush Source="{CompiledBinding KaiProfileImage}" BitmapInterpolationMode="HighQuality" />
<ImageBrush Source="{CompiledBinding KaiProfileImage}" />
</Ellipse.Fill>
</Ellipse>
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
@@ -79,9 +79,13 @@
<Border IsVisible="{CompiledBinding ProfileConfiguration.Icon.Fill}" Background="{DynamicResource CheckerboardBrush}" CornerRadius="{DynamicResource CardCornerRadius}"
Width="78" Height="78">
<Border Name="FillPreview" Background="{DynamicResource TextFillColorPrimary}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="10">
<Border Name="FillPreview"
Background="{DynamicResource TextFillColorPrimary}"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" Margin="10"
RenderOptions.BitmapInterpolationMode="HighQuality" >
<Border.OpacityMask>
<ImageBrush Source="{CompiledBinding SelectedBitmapSource}" BitmapInterpolationMode="HighQuality" />
<ImageBrush Source="{CompiledBinding SelectedBitmapSource}" />
</Border.OpacityMask>
</Border>
</Border>
@@ -127,8 +131,9 @@
</ComboBox>
</StackPanel>
<CheckBox VerticalAlignment="Bottom" IsChecked="{CompiledBinding FadeInAndOut}" ToolTip.Tip="Smoothly animates in and out when the profile activation conditions change.">Fade when enabling and disabling</CheckBox>
<CheckBox VerticalAlignment="Bottom" IsChecked="{CompiledBinding FadeInAndOut}" ToolTip.Tip="Smoothly animates in and out when the profile activation conditions change.">
Fade when enabling and disabling
</CheckBox>
</StackPanel>
</Border>
@@ -18,11 +18,13 @@ public class NodeMenuItemViewModel
public NodeMenuItemViewModel(ReactiveCommand<NodeData, Unit> createNode, NodeData nodeData)
{
Header = nodeData.Name;
Subtitle = nodeData.Description;
Items = new List<NodeMenuItemViewModel>();
CreateNode = ReactiveCommand.Create(() => { createNode.Execute(nodeData).Subscribe(); });
}
public string Header { get; }
public string? Subtitle { get; }
public List<NodeMenuItemViewModel> Items { get; }
public ReactiveCommand<Unit, Unit>? CreateNode { get; }
}
@@ -1,20 +1,20 @@
<windowing:AppWindow xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:visualScripting="clr-namespace:Artemis.UI.Screens.VisualScripting"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.VisualScripting.NodeScriptWindowView"
x:DataType="visualScripting:NodeScriptWindowViewModel"
Icon="/Assets/Images/Logo/application.ico"
Title="Artemis | Visual Script Editor"
Width="1200"
Height="800">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:visualScripting="clr-namespace:Artemis.UI.Screens.VisualScripting"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.VisualScripting.NodeScriptWindowView"
x:DataType="visualScripting:NodeScriptWindowViewModel"
Icon="/Assets/Images/Logo/application.ico"
Title="Artemis | Visual Script Editor"
Width="1200"
Height="800">
<Window.KeyBindings>
<KeyBinding Command="{CompiledBinding History.Undo}" Gesture="Ctrl+Z" />
<KeyBinding Command="{CompiledBinding History.Redo}" Gesture="Ctrl+Y" />
@@ -30,10 +30,21 @@
<MenuItem.Styles>
<Style Selector="MenuItem > MenuItem > MenuItem" x:DataType="visualScripting:NodeMenuItemViewModel">
<Setter Property="Command" Value="{CompiledBinding CreateNode}" />
<Setter Property="Header" Value="{CompiledBinding Header}" />
<Setter Property="ItemsSource" Value="{CompiledBinding Items}" />
</Style>
</MenuItem.Styles>
<MenuItem.DataTemplates>
<DataTemplate DataType="{x:Type visualScripting:NodeMenuItemViewModel}">
<StackPanel Background="Transparent" MaxWidth="300">
<TextBlock Text="{CompiledBinding Header}" TextWrapping="Wrap"></TextBlock>
<TextBlock IsVisible="{CompiledBinding Subtitle, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Foreground="{DynamicResource TextFillColorSecondary}"
Text="{CompiledBinding Subtitle}"
TextWrapping="Wrap">
</TextBlock>
</StackPanel>
</DataTemplate>
</MenuItem.DataTemplates>
</MenuItem>
<MenuItem Header="Auto-arrange" Command="{CompiledBinding AutoArrange}" InputGesture="Ctrl+F">
<MenuItem.Icon>