Device visualization - Improved performance to a good level for now

This commit is contained in:
SpoinkyNL committed 2020-04-16 17:09:28 +02:00
1 parent 55411d09fe
commit d647dfbd53
6 files changed
+84 -61

No files matched your search

@@ -173,7 +173,7 @@
<Slider Margin="0,0,14,0"
Orientation="Vertical"
Minimum="10"
Maximum="400"
Maximum="250"
Height="100"
FocusVisualStyle="{x:Null}"
Value="{Binding PanZoomViewModel.ZoomPercentage}"
@@ -181,7 +181,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
private void ApplySurfaceConfiguration(ArtemisSurface surface)
{
Devices.Clear();
Devices.AddRange(surface.Devices);
Devices.AddRange(surface.Devices.OrderBy(d => d.ZIndex));
}
private void UpdateLedsDimStatus()
@@ -40,8 +40,8 @@ namespace Artemis.UI.Screens.Shared
else
Zoom *= 0.9;
// Limit to a min of 0.1 and a max of 4 (10% - 400% in the view)
Zoom = Math.Max(0.1, Math.Min(4, Zoom));
// Limit to a min of 0.1 and a max of 2.5 (10% - 250% in the view)
Zoom = Math.Max(0.1, Math.Min(2.5, Zoom));
// Update the PanX/Y to enable zooming relative to cursor
if (LimitToZero)
@@ -26,7 +26,7 @@
<RotateTransform Angle="{Binding Device.Rotation}" />
</Grid.LayoutTransform>
<controls:DeviceVisualizer Device="{Binding Device}"></controls:DeviceVisualizer>
<controls:DeviceVisualizer Device="{Binding Device}"/>
<Rectangle Fill="{DynamicResource MaterialDesignCardBackground}"
Stroke="{DynamicResource MaterialDesignTextBoxBorder}"