1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

A few small UI tweaks so the surface editor can be finalized now

This commit is contained in:
Robert 2019-10-21 20:02:52 +02:00
parent 227d5846ff
commit 4e2afad268
3 changed files with 21 additions and 9 deletions

View File

@ -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)
{

View File

@ -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)

View File

@ -29,10 +29,13 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource MaterialDesignDisplay1TextBlock}">Surface layout</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource MaterialDesignCaptionTextBlock}">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.</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource MaterialDesignCaptionTextBlock}" Margin="0,0,0,5">
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.
</TextBlock>
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="2" Grid.Column="0"
VerticalAlignment="Stretch" Margin="0,0,5,0">
@ -237,5 +240,13 @@
</Grid>
</materialDesign:DialogHost>
</materialDesign:Card>
<TextBlock Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignCaptionTextBlock}" Margin="0,5,0,0">
<Run Text="Hold"/>
<Run FontWeight="Bold" Text="shift"/>
<Run Text="or click and drag to select multiple devices at once. To move around the surface hold down"/>
<Run FontWeight="Bold" Text="ctrl"/>
<Run Text="and drag."/>
</TextBlock>
</Grid>
</UserControl>