mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue