Improve precise wxTreeCtrl best size calculation (PR #25930)

26 views
Skip to first unread message

VZ

unread,
Oct 26, 2025, 5:20:44 PM (5 days ago) Oct 26
to wx-...@googlegroups.com, Subscribed

Try to compute the size of the items manually, even if GetBoundingRect() doesn't return it, as it happens when the items are collapsed.

This ensures the tree control best size is big enough to show the tree fully expanded.

Closes #25839.

Replaces #25843.


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

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

Commit Summary

  • 593ba84 Improve precise wxTreeCtrl best size calculation

File Changes

(1 file)

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/25930@github.com>

ssrlive

unread,
Oct 28, 2025, 12:30:25 PM (3 days ago) Oct 28
to wx-...@googlegroups.com, Subscribed
ssrlive left a comment (wxWidgets/wxWidgets#25930)
image.png (view on web)


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/25930/c3457379943@github.com>

VZ

unread,
Oct 28, 2025, 12:34:39 PM (3 days ago) Oct 28
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25930)

Sorry but I'd really appreciate if you could reformulate your comment in a text form because I have no idea what do you mean by this image.


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/25930/c3457410289@github.com>

ssrlive

unread,
Oct 28, 2025, 2:09:45 PM (3 days ago) Oct 28
to wx-...@googlegroups.com, Subscribed
ssrlive left a comment (wxWidgets/wxWidgets#25930)

Here are the results of my tests on three OSs using your PR code. Looks good.


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/25930/c3457824544@github.com>

VZ

unread,
Oct 28, 2025, 7:29:39 PM (3 days ago) Oct 28
to wx-...@googlegroups.com, Subscribed

Closed #25930.


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/25930/issue_event/20566732345@github.com>

VZ

unread,
Oct 28, 2025, 7:29:42 PM (3 days ago) Oct 28
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25930)

Merged in the commit above.


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/25930/c3458968089@github.com>

ssrlive

unread,
Oct 28, 2025, 11:17:16 PM (3 days ago) Oct 28
to wx-...@googlegroups.com, Subscribed
ssrlive left a comment (wxWidgets/wxWidgets#25930)

After I deleted this code, it ran like the picture below. I think it is safe to delete this code.

https://github.com/wxWidgets/wxWidgets/blob/bd14cf2dbf5d32dfee63e4bd8821471bd1186f6f/src/common/treebase.cpp#L262-L265

image.png (view on web)


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/25930/c3459457065@github.com>

VZ

unread,
10:14 AM (13 hours ago) 10:14 AM
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25930)

After I deleted this code, it ran like the picture below. I think it is safe to delete this code.

When using 200% DPI it looks bad without this extra indent:

image.png (view on web)

so I'd rather keep it.


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/25930/c3473283339@github.com>

Reply all
Reply to author
Forward
0 new messages