vcpkg: Update wxWidgets to 3.3.2 (#1824)

This commit is contained in:
Crementif 2026-03-12 21:58:22 +01:00 committed by GitHub
parent 3ee166101a
commit a04eb53822
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 48 additions and 7 deletions

View File

@ -0,0 +1,40 @@
diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp
index 5e1cd98a8b..169ab7847d 100644
--- a/src/msw/listctrl.cpp
+++ b/src/msw/listctrl.cpp
@@ -1385,20 +1385,29 @@ bool wxListCtrl::GetSubItemRect(long item, long subItem, wxRect& rect, int code)
wxCopyRECTToRect(rectWin, rect);
- // We can't use wxGetListCtrlSubItemRect() for the 0th subitem as 0 means
- // the entire row for this function, so we need to calculate it ourselves.
- if ( subItem == 0 && code == wxLIST_RECT_BOUNDS )
+ // We can't trust the native LVM_GETSUBITEMRECT for LVIR_BOUNDS because:
+ // - subitem 0 returns the entire row bounds, not just column 0
+ // - when column 0 is narrower than the icon, the native control clamps
+ // all subitems' left edge to at least the icon width, misaligning them
+ //
+ // So for all subitems we calculate x and width from GetColumnWidth() in
+ // visual (column order) order, which always reflects the real column sizes.
+ if ( subItem != wxLIST_GETSUBITEMRECT_WHOLEITEM && code == wxLIST_RECT_BOUNDS )
{
- // Because the columns can be reordered, we need to sum the widths of
- // all preceding columns to get the correct x position.
+ // Start from the row's left edge (which accounts for scrolling).
+ RECT rowRect;
+ wxGetListCtrlItemRect(GetHwnd(), item, LVIR_BOUNDS, rowRect);
+ int x = rowRect.left;
+
for ( auto col : GetColumnsOrder() )
{
if ( col == subItem )
break;
- rect.x += GetColumnWidth(col);
+ x += GetColumnWidth(col);
}
+ rect.x = x;
rect.width = GetColumnWidth(subItem);
}

View File

@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wxWidgets/wxWidgets
REF "bfd436b"
SHA512 bd3fd6d0d0db3b6fa34eceae1119e21ffd2f62221dcd249f8b8b82a6e65d83a05101e4e1e4ca9b9c4d7937add73b113bb029b03b05d2c3d87d17c1922d800a24
REF "v${VERSION}"
SHA512 c47460c8bc150445e7774a287a79bd70b6d96b91ea46b51f238a317f068e466d570c5a94e2204d112e42da781a5cef98236718efff4b7f539d61a12ceaf65eb7
HEAD_REF master
PATCHES
install-layout.patch
@ -12,14 +12,15 @@ vcpkg_from_github(
fix-pcre2.patch
gtk3-link-libraries.patch
sdl2.patch
fix-listctrl-layout.patch
)
# Submodule dependencies
vcpkg_from_github(
OUT_SOURCE_PATH lexilla_SOURCE_PATH
REPO wxWidgets/lexilla
REF "27c20a6ae5eebf418debeac0166052ed6fb653bc"
SHA512 7e5de7f664509473b691af8261fca34c2687772faca7260eeba5f2984516e6f8edf88c27192e056c9dda996e2ad2c20f6d1dff1c4bd2f3c0d74852cb50ca424a
REF "0dbce0b418b8b3d2ef30304d0bf53ff58c07ed84"
SHA512 61f7b0217f4518121ecad32f015b53600e565bdd499d4020468cf6c8a533d516c6881115aa5e640afca5ea428535f47680cde426fa3dbabe9e4423b4526853fd
HEAD_REF wx
)
file(COPY "${lexilla_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/stc/lexilla")

View File

@ -1,6 +1,6 @@
{
"name": "wxwidgets",
"version": "3.3.1",
"version": "3.3.2",
"description": [
"Widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. ",
"Set WXWIDGETS_USE_STL in a custom triplet to build with the wxUSE_STL build option.",

View File

@ -304,7 +304,7 @@ int wxGameList::GetColumnDefaultWidth(int column)
switch (column)
{
case ColumnIcon:
return kListIconWidth;
return kListIconWidth+2;
case ColumnName:
return DefaultColumnSize::name;
case ColumnVersion:
@ -994,7 +994,7 @@ void wxGameList::ApplyGameListColumnWidths()
const auto& config = GetWxGUIConfig();
wxWindowUpdateLocker lock(this);
if(config.show_icon_column)
SetColumnWidth(ColumnIcon, kListIconWidth);
SetColumnWidth(ColumnIcon, kListIconWidth+2);
else
SetColumnWidth(ColumnIcon, 0);
SetColumnWidth(ColumnName, config.column_width.name);