diff --git a/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml b/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml
index 0a46a2c7c..555a46173 100644
--- a/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml
+++ b/src/Artemis.UI.Avalonia.Shared/Artemis.UI.Avalonia.Shared.xml
@@ -201,7 +201,12 @@
- Defines the property.
+ Defines the property.
+
+
+
+
+ Defines the property.
@@ -227,6 +232,11 @@
Gets or sets the width of the control's border
+
+
+ Gets or sets the radius of the control's border
+
+
Gets or sets the element that captures input for the selection rectangle.
diff --git a/src/Avalonia/Artemis.UI.Shared/Controls/SelectionRectangle.cs b/src/Avalonia/Artemis.UI.Shared/Controls/SelectionRectangle.cs
index 37ee08bde..db8d7825a 100644
--- a/src/Avalonia/Artemis.UI.Shared/Controls/SelectionRectangle.cs
+++ b/src/Avalonia/Artemis.UI.Shared/Controls/SelectionRectangle.cs
@@ -26,11 +26,17 @@ namespace Artemis.UI.Shared.Controls
AvaloniaProperty.Register(nameof(BorderBrush), new SolidColorBrush(Colors.CadetBlue));
///
- /// Defines the property.
+ /// Defines the property.
///
public static readonly StyledProperty BorderThicknessProperty =
AvaloniaProperty.Register(nameof(BorderThickness), 1);
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty BorderRadiusProperty =
+ AvaloniaProperty.Register(nameof(BorderRadius), 0);
+
///
/// Defines the property.
///
@@ -75,6 +81,15 @@ namespace Artemis.UI.Shared.Controls
set => SetValue(BorderThicknessProperty, value);
}
+ ///
+ /// Gets or sets the radius of the control's border
+ ///
+ public double BorderRadius
+ {
+ get => GetValue(BorderRadiusProperty);
+ set => SetValue(BorderRadiusProperty, value);
+ }
+
///
/// Gets or sets the element that captures input for the selection rectangle.
///
@@ -181,7 +196,7 @@ namespace Artemis.UI.Shared.Controls
public override void Render(DrawingContext drawingContext)
{
if (_displayRect != null)
- drawingContext.DrawRectangle(Background, new Pen(BorderBrush, BorderThickness), _displayRect.Value, 4, 4);
+ drawingContext.DrawRectangle(Background, new Pen(BorderBrush, BorderThickness), _displayRect.Value, BorderRadius, BorderRadius);
}
///
diff --git a/src/Avalonia/Artemis.UI.Shared/Styles/TreeView.axaml b/src/Avalonia/Artemis.UI.Shared/Styles/TreeView.axaml
index df6fa92d6..8dbe7a74d 100644
--- a/src/Avalonia/Artemis.UI.Shared/Styles/TreeView.axaml
+++ b/src/Avalonia/Artemis.UI.Shared/Styles/TreeView.axaml
@@ -64,7 +64,7 @@
ColumnDefinitions="Auto, *"
Margin="{TemplateBinding Level, Mode=OneWay, Converter={StaticResource TreeViewItemLeftMarginConverter}}">
+ Margin="8 0 4 0">
+
+
diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml
index f45729b40..34bb3b41a 100644
--- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml
+++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/ProfileTree/FolderTreeItemView.axaml
@@ -13,16 +13,17 @@
Foreground="White"
Background="#E74C4C"
BorderBrush="#E74C4C"
+ Margin="0 0 5 0"
Command="{Binding ShowBrokenStateExceptions}">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorViewModel.cs b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorViewModel.cs
index 248a07b0c..2931181fb 100644
--- a/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorViewModel.cs
+++ b/src/Avalonia/Artemis.UI/Screens/ProfileEditor/Panels/VisualEditor/VisualEditorViewModel.cs
@@ -1,17 +1,28 @@
-using System.Collections.ObjectModel;
+using System;
+using System.Collections.ObjectModel;
+using System.Reactive.Disposables;
using Artemis.Core;
using Artemis.Core.Services;
-using Artemis.UI.Services;
using Artemis.UI.Services.ProfileEditor;
using Artemis.UI.Shared;
+using ReactiveUI;
namespace Artemis.UI.Screens.ProfileEditor.VisualEditor
{
public class VisualEditorViewModel : ActivatableViewModelBase
{
+ private ProfileConfiguration? _profileConfiguration;
+
public VisualEditorViewModel(IProfileEditorService profileEditorService, IRgbService rgbService)
{
Devices = new ObservableCollection(rgbService.EnabledDevices);
+ this.WhenActivated(d => profileEditorService.ProfileConfiguration.Subscribe(configuration => ProfileConfiguration = configuration).DisposeWith(d));
+ }
+
+ public ProfileConfiguration? ProfileConfiguration
+ {
+ get => _profileConfiguration;
+ set => this.RaiseAndSetIfChanged(ref _profileConfiguration, value);
}
public ObservableCollection Devices { get; }
diff --git a/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml b/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml
index 73db3af63..89e01fae6 100644
--- a/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml
+++ b/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceDeviceView.axaml
@@ -26,10 +26,10 @@
Classes.selection-border-selected="{Binding Highlighted}"
BorderThickness="1">
-
+
-
+
diff --git a/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorView.axaml b/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorView.axaml
index a9535db87..66f414663 100644
--- a/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorView.axaml
+++ b/src/Avalonia/Artemis.UI/Screens/SurfaceEditor/SurfaceEditorView.axaml
@@ -11,7 +11,6 @@
+
+
+
+
+