diff --git a/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj b/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj index 210637896..757dae819 100644 --- a/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj +++ b/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj @@ -16,11 +16,11 @@ - - + + - - + + diff --git a/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj b/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj index 000fe864e..389802cda 100644 --- a/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj +++ b/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj @@ -15,11 +15,11 @@ - - + + - - + + diff --git a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj index 35cf357d8..ecaac854d 100644 --- a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj +++ b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj @@ -10,13 +10,13 @@ - + - - - + + + - + diff --git a/src/Artemis.UI.Shared/Controls/DataModelPicker/DataModelPicker.cs b/src/Artemis.UI.Shared/Controls/DataModelPicker/DataModelPicker.cs index 621a96161..e3168eaba 100644 --- a/src/Artemis.UI.Shared/Controls/DataModelPicker/DataModelPicker.cs +++ b/src/Artemis.UI.Shared/Controls/DataModelPicker/DataModelPicker.cs @@ -308,7 +308,7 @@ public class DataModelPicker : TemplatedControl { GetDataModel(); UpdateCurrentPath(true); - _updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(200), DispatcherPriority.Normal, Update); + _updateTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(200), DispatcherPriority.Background, Update); _updateTimer.Start(); } diff --git a/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs b/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs index ff2869519..bd702941f 100644 --- a/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs +++ b/src/Artemis.UI.Shared/Controls/EnumComboBox.axaml.cs @@ -91,7 +91,7 @@ public partial class EnumComboBox : UserControl protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e) { _enumComboBox = this.Get("ChildEnumComboBox"); - _enumComboBox.Items = _currentValues; + _enumComboBox.ItemsSource = _currentValues; UpdateValues(); UpdateSelection(); diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs index 59ceef437..aa1a25ab4 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs @@ -37,8 +37,8 @@ public abstract class DataModelVisualizationViewModel : ReactiveObject, IDisposa CopyPath = ReactiveCommand.CreateFromTask(async () => { - if (Application.Current?.Clipboard != null && Path != null) - await Application.Current.Clipboard.SetTextAsync(Path); + if (Path != null) + await UI.Clipboard.SetTextAsync(Path); }); if (parent == null) diff --git a/src/Artemis.UI.Shared/DryIoc/ContainerExtensions.cs b/src/Artemis.UI.Shared/DryIoc/ContainerExtensions.cs index 1c86ecf84..c1e7006a7 100644 --- a/src/Artemis.UI.Shared/DryIoc/ContainerExtensions.cs +++ b/src/Artemis.UI.Shared/DryIoc/ContainerExtensions.cs @@ -16,7 +16,7 @@ public static class ContainerExtensions public static void RegisterSharedUI(this IContainer container) { Assembly artemisShared = typeof(IArtemisSharedUIService).GetAssembly(); - container.RegisterMany(new[] { artemisShared }, type => type.IsAssignableTo(), Reuse.Singleton); + container.RegisterMany(new[] {artemisShared}, type => type.IsAssignableTo(), Reuse.Singleton); UI.Locator = container; } diff --git a/src/Artemis.UI.Shared/Services/Builders/NotificationBuilder.cs b/src/Artemis.UI.Shared/Services/Builders/NotificationBuilder.cs index 5ba268315..c506ee1d9 100644 --- a/src/Artemis.UI.Shared/Services/Builders/NotificationBuilder.cs +++ b/src/Artemis.UI.Shared/Services/Builders/NotificationBuilder.cs @@ -26,7 +26,8 @@ public class NotificationBuilder public NotificationBuilder(Window parent) { _parent = parent; - _infoBar = new InfoBar {Classes = Classes.Parse("notification-info-bar")}; + _infoBar = new InfoBar(); + _infoBar.Classes.Add("notification-info-bar"); } /// @@ -204,11 +205,18 @@ public class NotificationButtonBuilder internal Control Build() { + Button button = new() {Content = _text}; + button.Classes.Add("AppBarButton"); + if (_action != null) - return new Button {Content = _text, Command = ReactiveCommand.Create(() => _action()), Classes = new Classes("AppBarButton")}; - if (_command != null) - return new Button {Content = _text, Command = _command, CommandParameter = _commandParameter, Classes = new Classes("AppBarButton")}; - return new Button {Content = _text, Classes = new Classes("AppBarButton")}; + button.Command = ReactiveCommand.Create(() => _action()); + else if (_command != null) + { + button.Command = _command; + button.CommandParameter = _commandParameter; + } + + return button; } } diff --git a/src/Artemis.UI.Shared/Services/Window/ExceptionDialogViewModel.cs b/src/Artemis.UI.Shared/Services/Window/ExceptionDialogViewModel.cs index 7b256509e..06a3ea86c 100644 --- a/src/Artemis.UI.Shared/Services/Window/ExceptionDialogViewModel.cs +++ b/src/Artemis.UI.Shared/Services/Window/ExceptionDialogViewModel.cs @@ -23,10 +23,7 @@ internal class ExceptionDialogViewModel : DialogViewModelBase public async Task CopyException() { - if (Application.Current?.Clipboard == null) - return; - - await Application.Current.Clipboard.SetTextAsync(Exception.ToString()); + await UI.Clipboard.SetTextAsync(Exception.ToString()); _notificationService.CreateNotification() .WithMessage("Copied stack trace to clipboard.") .WithSeverity(NotificationSeverity.Success) diff --git a/src/Artemis.UI.Shared/Styles/Controls/DataModelPicker.axaml b/src/Artemis.UI.Shared/Styles/Controls/DataModelPicker.axaml index 67ff351ca..425316ee9 100644 --- a/src/Artemis.UI.Shared/Styles/Controls/DataModelPicker.axaml +++ b/src/Artemis.UI.Shared/Styles/Controls/DataModelPicker.axaml @@ -53,7 +53,7 @@ + ItemsSource="{Binding DataModelViewModel.Children, RelativeSource={RelativeSource TemplatedParent}}"> diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowViewModel.cs b/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowViewModel.cs index 831c69b93..ba87decff 100644 --- a/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowViewModel.cs +++ b/src/Artemis.UI/Screens/VisualScripting/NodeScriptWindowViewModel.cs @@ -67,9 +67,9 @@ public class NodeScriptWindowViewModel : NodeScriptWindowViewModelBase { _keyBindingsEnabled = Shared.UI.KeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d); - DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Normal, Update); + DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Background, Update); // TODO: Remove in favor of saving each time a node editor command is executed - DispatcherTimer saveTimer = new(TimeSpan.FromMinutes(2), DispatcherPriority.Normal, Save); + DispatcherTimer saveTimer = new(TimeSpan.FromMinutes(2), DispatcherPriority.Background, Save); updateTimer.Start(); saveTimer.Start(); diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml b/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml index 62838e70c..ea4dc37ad 100644 --- a/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml +++ b/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml @@ -75,8 +75,8 @@ IsVisible="{CompiledBinding DisplayCustomViewModelAbove}" /> - - + + - - + + - + diff --git a/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml b/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml index 4c4eef93f..b98412f7a 100644 --- a/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml +++ b/src/Artemis.UI/Screens/VisualScripting/Pins/OutputPinCollectionView.axaml @@ -14,7 +14,7 @@ Command="{CompiledBinding AddPin}"> - + diff --git a/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj b/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj index 03500a177..9c0d6b679 100644 --- a/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj +++ b/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/src/Artemis.VisualScripting/Nodes/External/Screens/LayerPropertyNodeCustomView.axaml b/src/Artemis.VisualScripting/Nodes/External/Screens/LayerPropertyNodeCustomView.axaml index bfe7ab314..4a323a590 100644 --- a/src/Artemis.VisualScripting/Nodes/External/Screens/LayerPropertyNodeCustomView.axaml +++ b/src/Artemis.VisualScripting/Nodes/External/Screens/LayerPropertyNodeCustomView.axaml @@ -8,8 +8,8 @@ x:DataType="screens:LayerPropertyNodeCustomViewModel"> - - + + diff --git a/src/Artemis.VisualScripting/Nodes/Input/Screens/PressedKeyPositionNodeCustomView.axaml b/src/Artemis.VisualScripting/Nodes/Input/Screens/PressedKeyPositionNodeCustomView.axaml index f9a87a72c..bcb70f3f2 100644 --- a/src/Artemis.VisualScripting/Nodes/Input/Screens/PressedKeyPositionNodeCustomView.axaml +++ b/src/Artemis.VisualScripting/Nodes/Input/Screens/PressedKeyPositionNodeCustomView.axaml @@ -11,7 +11,7 @@ x:DataType="screens:PressedKeyPositionNodeCustomViewModel"> Layer - + diff --git a/src/Artemis.VisualScripting/Nodes/Operators/Screens/EnumEqualsNodeCustomView.axaml b/src/Artemis.VisualScripting/Nodes/Operators/Screens/EnumEqualsNodeCustomView.axaml index b97440803..ef9b82c8e 100644 --- a/src/Artemis.VisualScripting/Nodes/Operators/Screens/EnumEqualsNodeCustomView.axaml +++ b/src/Artemis.VisualScripting/Nodes/Operators/Screens/EnumEqualsNodeCustomView.axaml @@ -5,7 +5,7 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.VisualScripting.Nodes.Operators.Screens.EnumEqualsNodeCustomView"> { - DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Normal, Update); + DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Background, Update); updateTimer.Start(); Disposable.Create(() => updateTimer.Stop()).DisposeWith(d); }); diff --git a/src/Artemis.VisualScripting/Nodes/Transition/Screens/EasingFunctionNodeCustomView.axaml b/src/Artemis.VisualScripting/Nodes/Transition/Screens/EasingFunctionNodeCustomView.axaml index 0170bd620..457cb2994 100644 --- a/src/Artemis.VisualScripting/Nodes/Transition/Screens/EasingFunctionNodeCustomView.axaml +++ b/src/Artemis.VisualScripting/Nodes/Transition/Screens/EasingFunctionNodeCustomView.axaml @@ -6,5 +6,5 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.VisualScripting.Nodes.Transition.Screens.EasingFunctionNodeCustomView" x:DataType="screens:EasingFunctionNodeCustomViewModel"> - + \ No newline at end of file