mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Added workaround for invalidation issue in pan/zoom elements
This commit is contained in:
parent
34824dde42
commit
2e9b3d59d6
@ -187,7 +187,7 @@ public partial class DraggableNumberBox : UserControl
|
||||
|
||||
private void HandleKeyUp(object? sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter || e.Key == Key.Escape)
|
||||
if (e.Key is Key.Enter or Key.Escape)
|
||||
Focus();
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,12 @@ public partial class VisualEditorView : ReactiveUserControl<VisualEditorViewMode
|
||||
private void UpdateZoomBorderBackground()
|
||||
{
|
||||
if (ZoomBorder.Background is VisualBrush visualBrush)
|
||||
{
|
||||
visualBrush.DestinationRect = new RelativeRect(ZoomBorder.OffsetX * -1, ZoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
|
||||
// Workaround
|
||||
// This fixes an issue where the container is not invalidated, which leaves behind a 'smear' since Avalonia 11 rc1, check if still required later
|
||||
ZoomBorder.InvalidateVisual();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -48,6 +48,11 @@ public partial class SurfaceEditorView : ReactiveUserControl<SurfaceEditorViewMo
|
||||
private void UpdateZoomBorderBackground()
|
||||
{
|
||||
if (ContainerZoomBorder.Background is VisualBrush visualBrush)
|
||||
{
|
||||
visualBrush.DestinationRect = new RelativeRect(ContainerZoomBorder.OffsetX * -1, ContainerZoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
|
||||
// Workaround
|
||||
// This fixes an issue where the container is not invalidated, which leaves behind a 'smear' since Avalonia 11 rc1, check if still required later
|
||||
ContainerZoomBorder.InvalidateVisual();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user