Files
Cemu/dependencies/vcpkg_overlay_ports/wxwidgets/fix-dark-mode-offset.patch

26 lines
1.1 KiB
Diff

diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp
index 2b9e0d7f7e..7eab8b37df 100644
--- a/src/msw/listctrl.cpp
+++ b/src/msw/listctrl.cpp
@@ -3110,6 +3110,11 @@ bool HandleSubItemPrepaint(wxListCtrl* listctrl, LPNMLVCUSTOMDRAW pLVCD, HFONT h
if ( it.iImage != -1 )
{
+ if ( !listctrl->HasCheckBoxes() )
+ {
+ rc.left -= 6;
+ }
+
const int yImage = rc.top + ((rc.bottom - rc.top) / 2 - hImage / 2);
ImageList_Draw(himl, it.iImage, hdc, rc.left, yImage,
nmcd.uItemState & CDIS_SELECTED ? ILD_SELECTED
@@ -3235,7 +3240,7 @@ void HandleItemPaint(wxListCtrl* listctrl, LPNMLVCUSTOMDRAW pLVCD, HFONT hfont)
// do not draw item background colour under the checkbox/image
RECT rcIcon;
wxGetListCtrlItemRect(nmcd.hdr.hwndFrom, nmcd.dwItemSpec, LVIR_ICON, rcIcon);
- if ( !::IsRectEmpty(&rcIcon) )
+ if ( !::IsRectEmpty(&rcIcon) && listctrl->HasCheckBoxes() )
rc.left = rcIcon.right + listctrl->FromDIP(GAP_BETWEEN_CHECKBOX_AND_TEXT);
}