Fixed: big icons for folders

This commit is contained in:
Ray 2021-06-01 10:49:46 +01:00
parent 5c359474e8
commit 64fcff88ae

View File

@ -224,17 +224,21 @@ namespace AppLauncher.Windows.Forms
{ {
get get
{ {
if (this.Parent == null) Control parentControl = this.Parent;
while (true)
{ {
return null; if (parentControl == null)
} {
return null;
}
if (this.Parent.GetType() != typeof(FlowLayoutPanel)) if (parentControl.GetType() == typeof(FlowLayoutPanel))
{ {
return null; return parentControl as FlowLayoutPanel;
} }
return this.Parent as FlowLayoutPanel; parentControl = parentControl.Parent;
}
} }
} }
@ -242,23 +246,21 @@ namespace AppLauncher.Windows.Forms
{ {
get get
{ {
FlowLayoutPanel layoutPanel = this.FlowLayoutPanel; Control parentControl = this.FlowLayoutPanel;
if (layoutPanel == null) while (true)
{ {
return null; if (parentControl == null)
} {
return null;
}
if (layoutPanel.Parent == null) if (parentControl.GetType() == typeof(MainForm))
{ {
return null; return parentControl as MainForm;
} }
if (layoutPanel.Parent.GetType() != typeof(MainForm)) parentControl = parentControl.Parent;
{
return null;
} }
return layoutPanel.Parent as MainForm;
} }
} }