mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
This change should make the UI Icon Size setting dynamic, clearing all cached icons when the size changes (in the settings UI) so if they have a dynamic size the best is selected.
This commit is contained in:
parent
c50e5fa5ab
commit
61c2921b2a
16 changed files with 140 additions and 123 deletions
|
@ -35,7 +35,8 @@ namespace Greenshot.Forms {
|
|||
private static CoreConfiguration coreConfiguration = IniConfig.GetIniSection<CoreConfiguration>();
|
||||
private bool multiCheckAllowed = false;
|
||||
private bool updateInProgress = false;
|
||||
private static Image defaultImage = ImageHelper.CreateEmpty(coreConfiguration.IconSize.Width, coreConfiguration.IconSize.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb, Color.Transparent, 96f, 96f);
|
||||
private static Image defaultImage;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when one of the list's child element's Checked state changes.
|
||||
/// </summary>
|
||||
|
@ -49,10 +50,16 @@ namespace Greenshot.Forms {
|
|||
Identifier = identifier;
|
||||
CheckOnClick = false;
|
||||
multiCheckAllowed = allowMultiCheck;
|
||||
if (defaultImage == null || defaultImage.Size != coreConfiguration.IconSize) {
|
||||
if (defaultImage != null) {
|
||||
defaultImage.Dispose();
|
||||
}
|
||||
defaultImage = ImageHelper.CreateEmpty(coreConfiguration.IconSize.Width, coreConfiguration.IconSize.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb, Color.Transparent, 96f, 96f);
|
||||
}
|
||||
Image = defaultImage;
|
||||
}
|
||||
public ToolStripMenuSelectList() : this(null,false) {}
|
||||
public ToolStripMenuSelectList(Object identifier) : this(identifier,false) {}
|
||||
public ToolStripMenuSelectList(object identifier) : this(identifier,false) {}
|
||||
|
||||
/// <summary>
|
||||
/// gets or sets the currently checked item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue