Selaa lähdekoodia

client size can change with border

Unknown 7 vuotta sitten
vanhempi
sitoutus
3fc08d3e37
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      bgravirtualscreen.pas

+ 2 - 2
bgravirtualscreen.pas

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