Browse Source

Sizing animation box with image size

Source commit: e081d6a870293b2f6f7a68f9bbf0e7d7db9e7b99
Martin Prikryl 10 years ago
parent
commit
39567c6896
1 changed files with 2 additions and 0 deletions
  1. 2 0
      source/windows/GUITools.cpp

+ 2 - 0
source/windows/GUITools.cpp

@@ -905,6 +905,8 @@ void __fastcall TFrameAnimation::DoInit(TPaintBox * PaintBox, TPngImageList * Im
   DebugAssert((PaintBox->OnPaint == NULL) || (PaintBox->OnPaint == PaintBoxPaint));
   PaintBox->ControlStyle = PaintBox->ControlStyle << csOpaque;
   PaintBox->OnPaint = PaintBoxPaint;
+  PaintBox->Width = FImageList->Width;
+  PaintBox->Height = FImageList->Height;
   FPaintBox = PaintBox;
 
   FNamed = !Name.IsEmpty();