Fix positioning images in generic wx{List,Tree}Ctrl in high DPI (PR #26397)

17 views
Skip to first unread message

VZ

unread,
Apr 19, 2026, 4:52:12 PM (5 days ago) Apr 19
to wx-...@googlegroups.com, Subscribed

The implementation of GetImageLogicalSize() overload taking the image index returned correct answer for this individual image, but was wrong when used in the control with multiple images with different logical sizes. This resulted in the actual bitmap being drawn, as returned by GetImageBitmapFor(), being of different size than the size returned by this function, as GetImageBitmapFor() uses the best ("consensus") size for all images, which is also returned by GetImageLogicalSize() overload not taking the image.

Solve this by simply getting rid of the overload taking the image and replacing all existing calls to it with the calls to the other overload. This is backwards-incompatible, but this function was only added in 3.3 and removing it is a lesser evil than either leaving a function which can only be misused, or keeping the unused image index parameter which would be confusing.

Closes #26391.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26397

Commit Summary

  • c45b10f Fix positioning images in generic wx{List,Tree}Ctrl in high DPI

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26397@github.com>

VZ

unread,
Apr 20, 2026, 8:34:24 AM (4 days ago) Apr 20
to wx-...@googlegroups.com, Push

@vadz pushed 1 commit.

  • c2a8bad Fix positioning images in generic wx{List,Tree}Ctrl in high DPI


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26397/before/c45b10fc94466204dd9a4fe9e6688e31a694c1c0/after/c2a8bad4b565e2664a88b138c8a741b8f03f69a4@github.com>

Reply all
Reply to author
Forward
0 new messages