Skip to content

Commit 13dc1b6

Browse files
committed
Improved ShortcutDialog update 8
Images work properly with 32x32 size.
1 parent 7ad4727 commit 13dc1b6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

FlashDevelop/Dialogs/ShortcutDialog.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,15 @@ private void InitializeComponent()
201201
/// </summary>
202202
void InitializeGraphics()
203203
{
204-
this.pictureBox.Image = Globals.MainForm.FindImage("229");
205-
this.clearButton.Image = Globals.MainForm.FindImage("153");
204+
using (var imageList = new ImageList())
205+
{
206+
imageList.ColorDepth = ColorDepth.Depth32Bit;
207+
imageList.ImageSize = new Size(16, 16);
208+
imageList.Images.Add(ScaleHelper.Scale((Bitmap) Globals.MainForm.FindImage("229", false)));
209+
imageList.Images.Add(ScaleHelper.Scale((Bitmap) Globals.MainForm.FindImage("153", false)));
210+
this.pictureBox.Image = imageList.Images[0];
211+
this.clearButton.Image = imageList.Images[1];
212+
}
206213
}
207214

208215
/// <summary>

0 commit comments

Comments
 (0)