wxAuiToolBar should update packing/padding/margins on DPI change on MSW (Issue #26076)

29 views
Skip to first unread message

dsa-t

unread,
Jan 7, 2026, 5:14:59 AMJan 7
to wx-...@googlegroups.com, Subscribed
dsa-t created an issue (wxWidgets/wxWidgets#26076)

Description

wxAuiToolBar::Create contains initialization of some packing/padding/margins values which are not updated on DPI change. Would be great to have them updated on DPI change.

https://github.com/wxWidgets/wxWidgets/blob/1b582af60d99388b56b383fe240b647387a5e4b4/src/aui/auibar.cpp#L954-L967

Probably needs some flags to detect if user calls SetToolPacking/SetToolBorderPadding/SetMargins to disable these automatic updates.

This only matters on MSW.

Platform and version information

  • wxWidgets version you use: master (3.3)
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 11


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

VZ

unread,
Jan 7, 2026, 11:42:23 AMJan 7
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26076)

I think we should do the same thing as we did in 0e7420f (Fix per-monitor DPI handling of wxAuiToolBarArt element sizes, 2025-02-24) and 43b55cf (Avoid scaling small metrics by DPI in wxAuiDockArt, 2025-02-22), i.e. just store these values in DIPs and apply FromDIP() when using them.

The only problem is that SetToolPacking() and SetMargins() would need to use ToDIP() to remain compatible which is a bit weird, but I guess not that much of a problem in practice.


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/issues/26076/3719756620@github.com>

VZ

unread,
Feb 23, 2026, 3:00:02 PM (2 days ago) Feb 23
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26076)

AFAICS this is as simple as #26235, please let me know if you (still) see any problems with 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/issues/26076/3946997305@github.com>

VZ

unread,
Feb 24, 2026, 10:53:45 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed

Closed #26076 as completed via 5d0281e.


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/issue/26076/issue_event/23039752062@github.com>

Reply all
Reply to author
Forward
0 new messages