Added: big icon support

This commit is contained in:
Ray committed 2020-11-14 16:47:52 +00:00
1 parent eb334fe00c
commit 71480592d2
6 files changed
+111 -20

No files matched your search

+27 -2
View File
@@ -85,7 +85,7 @@ namespace AppLauncher.Windows.Forms
{
this.DropFileList(fileList);
this.LoadInfo(this.ModelInfo);
invalidateGroupMenu(this.ModelInfo);
}
else
{
@@ -227,6 +227,8 @@ namespace AppLauncher.Windows.Forms
{
if (groupContextMenu != null)
{
invalidateGroupMenuSize();
groupContextMenu.Show(this, e.Location);
}
}
@@ -341,7 +343,11 @@ namespace AppLauncher.Windows.Forms
protected void invalidateGroupMenu(TileModel model)
{
if (groupContextMenu == null) groupContextMenu = new ContextMenuStrip();
if (groupContextMenu == null)
{
groupContextMenu = new ContextMenuStrip();
}
groupContextMenu.Items.Clear();
if (model.Items == null)
@@ -356,7 +362,26 @@ namespace AppLauncher.Windows.Forms
toolItem.Tag = item;
toolItem.Click += toolItem_Click;
}
}
protected void invalidateGroupMenuSize()
{
if (this.PanelContainer != null)
{
if (this.PanelContainer.MainForm != null)
{
if (this.PanelContainer.MainForm.CurrentSession != null)
{
if (this.PanelContainer.MainForm.CurrentSession.EnableBigIconInFolder)
{
groupContextMenu.ImageScalingSize = new Size(24, 24);
return;
}
}
}
}
groupContextMenu.ImageScalingSize = new Size(16, 16);
}
protected MainForm findMainForm()
+42 -1
View File
@@ -129,7 +129,24 @@ namespace AppLauncher.Windows.Forms
}
}
public bool EnableAnimation { get; set; } = true;
public bool EnableAnimation
{
get
{
MainForm mainForm = this.MainForm;
if (mainForm == null)
{
return false;
}
if (mainForm.CurrentSession == null)
{
return false;
}
return mainForm.CurrentSession.EnableAnimation;
}
}
public int CollapseHeight => labelHeight + collapseHeight;
@@ -221,6 +238,30 @@ namespace AppLauncher.Windows.Forms
}
}
public MainForm MainForm
{
get
{
FlowLayoutPanel layoutPanel = this.FlowLayoutPanel;
if (layoutPanel == null)
{
return null;
}
if (layoutPanel.Parent == null)
{
return null;
}
if (layoutPanel.Parent.GetType() != typeof(MainForm))
{
return null;
}
return layoutPanel.Parent as MainForm;
}
}
public List<TileModel> Tiles
{
get