mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixes #2418. SetToplevelsSize is wrongly forcing toplevels resizing to console size.
This commit is contained in:
@@ -1547,7 +1547,6 @@ namespace Terminal.Gui {
|
||||
static void TerminalResized ()
|
||||
{
|
||||
var full = new Rect (0, 0, Driver.Cols, Driver.Rows);
|
||||
SetToplevelsSize (full);
|
||||
Resized?.Invoke (new ResizedEventArgs () { Cols = full.Width, Rows = full.Height });
|
||||
Driver.Clip = full;
|
||||
foreach (var t in toplevels) {
|
||||
@@ -1559,23 +1558,6 @@ namespace Terminal.Gui {
|
||||
Refresh ();
|
||||
}
|
||||
|
||||
static void SetToplevelsSize (Rect full)
|
||||
{
|
||||
if (MdiTop == null) {
|
||||
foreach (var t in toplevels) {
|
||||
if (t?.SuperView == null && !t.Modal) {
|
||||
t.Frame = full;
|
||||
t.Width = full.Width;
|
||||
t.Height = full.Height;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Top.Frame = full;
|
||||
Top.Width = full.Width;
|
||||
Top.Height = full.Height;
|
||||
}
|
||||
}
|
||||
|
||||
static bool SetCurrentAsTop ()
|
||||
{
|
||||
if (MdiTop == null && Current != Top && Current?.SuperView == null && Current?.Modal == false) {
|
||||
|
||||
Reference in New Issue
Block a user