mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[FZEditor] Canvas layout width/height resize fix (#20099)
This commit is contained in:
@@ -53,7 +53,6 @@ namespace FancyZonesEditor
|
||||
_model = model;
|
||||
|
||||
var workArea = App.Overlay.WorkArea;
|
||||
_model.ScaleLayout(workAreaWidth: workArea.Width, workAreaHeight: workArea.Height);
|
||||
|
||||
UpdateZoneRects();
|
||||
|
||||
|
||||
@@ -264,7 +264,9 @@ namespace FancyZonesEditor
|
||||
private void RenderCanvasPreview(CanvasLayoutModel canvas)
|
||||
{
|
||||
var screenWorkArea = App.Overlay.WorkArea;
|
||||
canvas.ScaleLayout(workAreaWidth: screenWorkArea.Width, workAreaHeight: screenWorkArea.Height);
|
||||
|
||||
var renderLayout = (CanvasLayoutModel)canvas.Clone();
|
||||
renderLayout.ScaleLayout(workAreaWidth: screenWorkArea.Width, workAreaHeight: screenWorkArea.Height);
|
||||
|
||||
Viewbox viewbox = new Viewbox
|
||||
{
|
||||
@@ -278,7 +280,7 @@ namespace FancyZonesEditor
|
||||
};
|
||||
viewbox.Child = frame;
|
||||
|
||||
foreach (Int32Rect zone in canvas.Zones)
|
||||
foreach (Int32Rect zone in renderLayout.Zones)
|
||||
{
|
||||
Border rect = new Border();
|
||||
Canvas.SetTop(rect, zone.Y);
|
||||
|
||||
Reference in New Issue
Block a user