mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Removed Loaded event and changed LayoutComplete event.
This commit is contained in:
@@ -126,9 +126,13 @@ namespace Terminal.Gui {
|
|||||||
|
|
||||||
// On resize
|
// On resize
|
||||||
LayoutComplete += (LayoutEventArgs a) => {
|
LayoutComplete += (LayoutEventArgs a) => {
|
||||||
search.Width = Bounds.Width;
|
if (!autoHide && search.Frame.Width != Bounds.Width ||
|
||||||
listview.Width = autoHide ? Bounds.Width - 1 : Bounds.Width;
|
autoHide && search.Frame.Width != Bounds.Width - 1) {
|
||||||
listview.Height = CalculatetHeight ();
|
search.Width = listview.Width = autoHide ? Bounds.Width - 1 : Bounds.Width;
|
||||||
|
listview.Height = CalculatetHeight ();
|
||||||
|
search.SetRelativeLayout (Bounds);
|
||||||
|
listview.SetRelativeLayout (Bounds);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
listview.SelectedItemChanged += (ListViewItemEventArgs e) => {
|
listview.SelectedItemChanged += (ListViewItemEventArgs e) => {
|
||||||
@@ -138,12 +142,6 @@ namespace Terminal.Gui {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is needed in addition to 'Adding' to trigger the capture the Bounds.Width & Height
|
|
||||||
Application.Loaded += (Application.ResizedEventArgs a) => {
|
|
||||||
SetNeedsLayout ();
|
|
||||||
Search_Changed (Text);
|
|
||||||
};
|
|
||||||
|
|
||||||
Adding += (View v) => {
|
Adding += (View v) => {
|
||||||
|
|
||||||
// Determine if this view is hosted inside a dialog
|
// Determine if this view is hosted inside a dialog
|
||||||
|
|||||||
Reference in New Issue
Block a user