Changeset 620


Ignore:
Timestamp:
Sep 15, 2024, 5:34:07 PM (2 months ago)
Author:
chronos
Message:
  • Modified: Do not use Screen Width and Height values for Offscreen bitmap size initialization to improve multi monitor support.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r619 r620  
    35073507
    35083508  MainFormKeyDown := FormKeyDown;
    3509   BaseWin.CreateOffscreen(Offscreen);
     3509  BaseWin.CreateOffscreen(Offscreen, Width, Height);
    35103510
    35113511  // define which menu settings to save
     
    82978297  MiniFrame, MaxMapWidth: Integer;
    82988298begin
    8299   BaseWin.CreateOffscreen(Offscreen);
     8299  BaseWin.CreateOffscreen(Offscreen, Width, Height);
    83008300  SmallScreen := Width < 1024;
    83018301  with MainMap do begin
  • trunk/Packages/CevoComponents/BaseWin.pas

    r567 r620  
    6969  SideFrame = 9;
    7070
    71 procedure CreateOffscreen(var Offscreen: TBitmap);
     71procedure CreateOffscreen(var Offscreen: TBitmap; Width, Height: Integer);
    7272function WindowModeMakePersistent(Mode: TWindowMode): TWindowMode;
    7373procedure Register;
     
    9393constructor TBufferedDrawDlg.Create(AOwner: TComponent);
    9494begin
    95   BaseWin.CreateOffscreen(Offscreen);
     95  BaseWin.CreateOffscreen(Offscreen, Width, Height);
    9696  OnClose := FormClose;
    9797  OnPaint := FormPaint;
     
    159159procedure TBufferedDrawDlg.OffscreenPaint;
    160160begin
     161  BaseWin.CreateOffscreen(Offscreen, Width, Height);
    161162  if (OffscreenUser <> nil) and (OffscreenUser <> Self) then
    162163    OffscreenUser.Update; // complete working with old owner to prevent rebound
     
    332333  Frame(Canvas, SideFrame - 1, TitleHeight - 1, ClientWidth - SideFrame,
    333334    InnerBottom, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    334   // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1,
    335   // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight);
     335  // RFrame(Canvas,SideFrame - 2, TitleHeight - 2, ClientWidth - SideFrame + 1,
     336  // InnerBottom + 1, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    336337  if FullCaption then begin
    337338    if (FWindowMode <> wmModal) or not ModalIndication then
     
    475476end;
    476477
    477 procedure CreateOffscreen(var Offscreen: TBitmap);
     478procedure CreateOffscreen(var Offscreen: TBitmap; Width, Height: Integer);
    478479var
    479480  NewWidth: Integer;
     
    484485    Offscreen.PixelFormat := TPixelFormat.pf24bit;
    485486  end;
    486   if Screen.Height - yUnused < 480 then begin
    487     NewWidth := Screen.Width;
     487  if Height - yUnused < 480 then begin
     488    NewWidth := Width;
    488489    NewHeight := 480;
    489490  end else begin
    490     NewWidth := Screen.Width;
    491     NewHeight := Screen.Height - yUnused;
     491    NewWidth := Width;
     492    NewHeight := Height - yUnused;
    492493  end;
    493494  if (Offscreen.Width <> NewWidth) or (Offscreen.Height <> NewHeight) then begin
  • trunk/Packages/DpiControls/Dpi.Controls.pas

    r570 r620  
    375375  end;
    376376
    377 
    378377var
    379378  Mouse: TMouse;
Note: See TracChangeset for help on using the changeset viewer.