Browse Source

Merge branch 'dev-bgracontrols' of https://github.com/bgrabitmap/bgracontrols into dev-bgracontrols

lainz 7 years ago
parent
commit
7810ea5d95
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bgravirtualscreen.pas

+ 2 - 2
bgravirtualscreen.pas

@@ -227,14 +227,14 @@ begin
   // to avoid flickering in Windows running without themes (classic style)
   DoubleBuffered := ControlCount <> 0;
   {$ENDIF}
-  BGRASetSize(Width, Height);
+  BGRASetSize(ClientWidth, ClientHeight);
   FBGRA.Draw(Canvas, 0, 0);
 end;
 
 procedure TCustomBGRAVirtualScreen.Resize;
 begin
   inherited Resize;
-  if (FBGRA <> nil) and ((Width <> FBGRA.Width) or (Height <> FBGRA.Height)) then
+  if (FBGRA <> nil) and ((ClientWidth <> FBGRA.Width) or (ClientHeight <> FBGRA.Height)) then
     DiscardBitmap;
 end;