Fixed resize in single window
issue: MatterHackers/MCCentral#4696 DialogPage fails to resize in SingleWindow mode issue: MatterHackers/MCCentral#4695 Make ShownWelcomeMessage user rather than application based
This commit is contained in:
parent
553d09c353
commit
536c0e2f68
5 changed files with 33 additions and 6 deletions
|
|
@ -42,7 +42,34 @@ namespace MatterHackers.Agg.UI
|
|||
protected List<SystemWindow> _openWindows = new List<SystemWindow>();
|
||||
protected IPlatformWindow platformWindow;
|
||||
|
||||
public SystemWindow TopWindow { get; private set; }
|
||||
SystemWindow _topWindow;
|
||||
public SystemWindow TopWindow
|
||||
{
|
||||
get => _topWindow;
|
||||
|
||||
private set
|
||||
{
|
||||
void MaintainSizes(object s, EventArgs e)
|
||||
{
|
||||
foreach (var window in _openWindows)
|
||||
{
|
||||
if (_topWindow != window)
|
||||
{
|
||||
window.LocalBounds = new RectangleDouble(0, 0, _topWindow.Width, _topWindow.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_topWindow != null)
|
||||
{
|
||||
_topWindow.SizeChanged -= MaintainSizes;
|
||||
}
|
||||
|
||||
_topWindow = value;
|
||||
|
||||
_topWindow.SizeChanged += MaintainSizes;
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyList<SystemWindow> OpenWindows => _openWindows;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue