Ignore:
Timestamp:
Jun 25, 2020, 10:24:44 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Scaling IsoEngine ForgOfWar sprites.
  • Fixed: PopupMenu position calculated using not scaled GetSystemMetrics.
  • Fixed: Scale TDpiBitmaps using normal scaling functions to get pixels on valid expected possition.
  • Fixed: DpiBitBlt needs to be executed as StretchDraw for non-integer pixel scaling. This leads to slower drawing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/Select.pas

    r252 r265  
    684684      kTribe, kMission: // center text
    685685        if Lines[0] > MaxLines then
    686           x := (InnerWidth - GetSystemMetrics(SM_CXVSCROLL)) div 2 -
     686          x := (InnerWidth - DpiGetSystemMetrics(SM_CXVSCROLL)) div 2 -
    687687            BiColorTextWidth(ca, s) div 2
    688688        else
     
    15751575    kTribe:
    15761576      if Lines[0] > MaxLines then
    1577         InnerWidth := 280 + GetSystemMetrics(SM_CXVSCROLL)
     1577        InnerWidth := 280 + DpiGetSystemMetrics(SM_CXVSCROLL)
    15781578      else
    15791579        InnerWidth := 280;
     
    15811581      begin
    15821582        InnerWidth := 104 - 33 + 15 + 8 + TechNameSpace + 24 * nColumn +
    1583           GetSystemMetrics(SM_CXVSCROLL);
     1583          DpiGetSystemMetrics(SM_CXVSCROLL);
    15841584        if InnerWidth + 2 * SideFrame > 640 then
    15851585        begin
     
    15901590    kAdvance, kFarAdvance:
    15911591      InnerWidth := 104 - 33 + 15 + 8 + TechNameSpace + 24 +
    1592         GetSystemMetrics(SM_CXVSCROLL);
     1592        DpiGetSystemMetrics(SM_CXVSCROLL);
    15931593    kChooseTech, kChooseETech, kStealTech:
    15941594      InnerWidth := 104 - 33 + 15 + 8 + TechNameSpace +
    1595         GetSystemMetrics(SM_CXVSCROLL);
     1595        DpiGetSystemMetrics(SM_CXVSCROLL);
    15961596  else
    15971597    InnerWidth := 363;
     
    16041604  { TODO:
    16051605  SetWindowPos(sb.ScrollBar.Handle, 0, SideFrame + InnerWidth - GetSystemMetrics(SM_CXVSCROLL),
    1606     TitleHeight, GetSystemMetrics(SM_CXVSCROLL), LineDistance * DispLines + 48,
     1606    TitleHeight, DpiGetSystemMetrics(SM_CXVSCROLL), LineDistance * DispLines + 48,
    16071607    SWP_NOZORDER or SWP_NOREDRAW);
    16081608  }
Note: See TracChangeset for help on using the changeset viewer.