From 4e2afad268b16b378f25fed0a7a168c481c9ee31 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 21 Oct 2019 20:02:52 +0200 Subject: [PATCH] A few small UI tweaks so the surface editor can be finalized now --- src/Artemis.UI/ViewModels/PanZoomViewModel.cs | 2 +- .../ViewModels/Screens/SurfaceEditorViewModel.cs | 13 +++++++------ .../Views/Screens/SurfaceEditorView.xaml | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/Artemis.UI/ViewModels/PanZoomViewModel.cs b/src/Artemis.UI/ViewModels/PanZoomViewModel.cs index e69696cea..dfc04370b 100644 --- a/src/Artemis.UI/ViewModels/PanZoomViewModel.cs +++ b/src/Artemis.UI/ViewModels/PanZoomViewModel.cs @@ -25,7 +25,7 @@ namespace Artemis.UI.ViewModels public double PanX { get; set; } public double PanY { get; set; } - public Rect BackgroundViewport => new Rect(PanX, PanY, 20 * Zoom, 20 * Zoom); + public Rect BackgroundViewport => new Rect(PanX, PanY, 20, 20); public void ProcessMouseScroll(object sender, MouseWheelEventArgs e) { diff --git a/src/Artemis.UI/ViewModels/Screens/SurfaceEditorViewModel.cs b/src/Artemis.UI/ViewModels/Screens/SurfaceEditorViewModel.cs index b621a84cc..0090e7a14 100644 --- a/src/Artemis.UI/ViewModels/Screens/SurfaceEditorViewModel.cs +++ b/src/Artemis.UI/ViewModels/Screens/SurfaceEditorViewModel.cs @@ -228,18 +228,19 @@ namespace Artemis.UI.ViewModels.Screens _mouseDragStartPoint = position; } - // While dragging always show an arrow to avoid cursor flicker - Mouse.OverrideCursor = Cursors.Arrow; + // While dragging always show a hand to avoid cursor flicker + if (_mouseDragStatus == MouseDragStatus.Dragging) + Mouse.OverrideCursor = Cursors.Hand; + else + Mouse.OverrideCursor = Cursors.Arrow; + // Any time dragging starts, start with a new rect SelectionRectangle.Rect = new Rect(); } private void StopMouseDrag(Point position) { - if (_mouseDragStatus == MouseDragStatus.Dragging) - { - } - else + if (_mouseDragStatus != MouseDragStatus.Dragging) { var selectedRect = new Rect(_mouseDragStartPoint, position); foreach (var device in Devices) diff --git a/src/Artemis.UI/Views/Screens/SurfaceEditorView.xaml b/src/Artemis.UI/Views/Screens/SurfaceEditorView.xaml index 1a0ed8071..914b19982 100644 --- a/src/Artemis.UI/Views/Screens/SurfaceEditorView.xaml +++ b/src/Artemis.UI/Views/Screens/SurfaceEditorView.xaml @@ -29,10 +29,13 @@ + Surface layout - The surface is a digital representation of your LED setup. Set this up accurately and effects will seamlessly move from one device to the other. + + The surface is a digital representation of your LED setup. Set this up accurately and effects will seamlessly move from one device to the other. + @@ -168,7 +171,7 @@ - + @@ -237,5 +240,13 @@ + + + + + + + + \ No newline at end of file