Skip to content

Commit

Permalink
Fix drawing of icons for non-root wxTreeCtrl items
Browse files Browse the repository at this point in the history
Fix y coordinate value passed to wxDC::DrawBitmap() by restoring the
parentheses accidentally removed in 6dd4e73 (Add wxDrawImageBitmap()
helper and use it in wx{List,Tree}Ctrl, 2022-10-25).

(cherry picked from commit 2a13fd2)

See #23255.
  • Loading branch information
vadz committed Feb 13, 2023
1 parent 0f6dfb6 commit 2922fa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generic/treectlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
dc,
item->GetX(),
item->GetY() +
total_h > state_h ? (total_h-state_h)/2 : 0);
(total_h > state_h ? (total_h-state_h)/2 : 0));
}

if ( image != NO_IMAGE )
Expand All @@ -2719,7 +2719,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
dc,
item->GetX() + state_w,
item->GetY() +
total_h > image_h ? (total_h-image_h)/2 : 0);
(total_h > image_h ? (total_h-image_h)/2 : 0));
}

dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
Expand Down

0 comments on commit 2922fa0

Please sign in to comment.