Ver código fonte

client size can change with border

Unknown 7 anos atrás
pai
commit
3fc08d3e37
1 arquivos alterados com 2 adições e 2 exclusões
  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;