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:
RKrom 2014-11-11 13:23:59 +01:00
parent c50e5fa5ab
commit 61c2921b2a
16 changed files with 140 additions and 123 deletions

View file

@ -34,7 +34,10 @@ namespace Greenshot.Controls {
private static Image scaledCheckbox;
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) {
if (scaledCheckbox == null) {
if (scaledCheckbox == null || scaledCheckbox.Size != coreConfiguration.IconSize) {
if (scaledCheckbox != null) {
scaledCheckbox.Dispose();
}
scaledCheckbox = ImageHelper.ResizeImage(e.Image, true, coreConfiguration.IconSize.Width, coreConfiguration.IconSize.Height, null);
}
Rectangle old = e.ImageRectangle;