Improve sizer-creating code in the widgets sample (PR #26941)

28 views
Skip to first unread message

PB

unread,
Aug 28, 2026, 9:58:05 AM (4 days ago) Aug 28
to wx-...@googlegroups.com, Subscribed

Fix the invalid sizer flag combination on the hyperlink page.

Replace pattern "wxSizer::Add(0, 0, wxSizerFlags(1).Centre());" with more readable "wxSizer::AddStretchSpacer(1)".


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

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

Commit Summary

  • 02a9666 Improve sizer-creating code in the widgets sample

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26941@github.com>

PB

unread,
Aug 28, 2026, 10:34:09 AM (4 days ago) Aug 28
to wx-...@googlegroups.com, Subscribed
PBfordev left a comment (wxWidgets/wxWidgets#26941)

I think we should also:
1 Remove the 0 from all those wxSizerFlags(0).
2. Add FromDIP() wherever it is missing in all the SetMinSize() calls.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26941/c5453817268@github.com>

VZ

unread,
Aug 30, 2026, 7:00:22 PM (2 days ago) Aug 30
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

Sorry for nitpicking but why do we need 1 inside AddStretchSpacer() calls? I'd just write it without arguments, why not?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26941/review/5062121751@github.com>

PB

unread,
Aug 31, 2026, 1:24:05 PM (11 hours ago) Aug 31
to wx-...@googlegroups.com, Push

@PBfordev pushed 1 commit.

  • 0a791a0 Improve sizing-related code in the widgets sample


View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26941/before/02a966696975dcd0bdf2c5e300fba84387b6bee7/after/0a791a00cd46fcbbeaa415ec71e25ed217a401f8@github.com>

PB

unread,
Aug 31, 2026, 1:27:18 PM (11 hours ago) Aug 31
to wx-...@googlegroups.com, Subscribed
PBfordev left a comment (wxWidgets/wxWidgets#26941)

Sorry for nitpicking but why do we need 1 inside AddStretchSpacer() calls?

Sorry, my bad.

I have also removed wxSizer::Add(n, n, ...) with wxSizer::AddSpacer(n) and added FromDIP() to all sizing calls where it was still missing (i.e., the most). I only skipped it in two places, where it is used for bitmaps (wxBitmapBundle and wxImageList): It should probably be used there as well, but I was not sure.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26941/c5481988887@github.com>

Reply all
Reply to author
Forward
0 new messages