mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:19:13 +08:00
[FZEditor] Canvas layout width/height resize fix (#20099)
This commit is contained in:
parent
56264eb089
commit
c0d5f36224
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user