AUI pane becomes huge on DPI change if a partial minimum size is specified (Issue #26557)

10 views
Skip to first unread message

taler21

unread,
2:44 AM (12 hours ago) 2:44 AM
to wx-...@googlegroups.com, Subscribed
taler21 created an issue (wxWidgets/wxWidgets#26557)

For example, if an AUI pane has a minimum width but no minimum height specified, and it has a scroll bar because its content cannot be fully displayed at its current size, the pane becomes huge when the DPI changed.
It seems as if the size of the pane grows to such an extent that its entire content would be visible, even if the size extends far beyond the screen.

I would expect the current size to be retained, merely scaled to the changed DPI.

The issue can also be reproduced in the aui sample with the following changes.

diff -r -u -p a/samples/aui/auidemo.cpp b/samples/aui/auidemo.cpp
--- a/samples/aui/auidemo.cpp	2026-06-03 08:31:53.061465300 +0200
+++ b/samples/aui/auidemo.cpp	2026-06-03 08:32:40.014698200 +0200
@@ -1044,7 +1044,7 @@ MyFrame::MyFrame(wxWindow* parent,
 
     m_mgr.AddPane(CreateTreeCtrl(), wxAuiPaneInfo().
                   Name("tree").Caption("Tree Pane").
-                  Left().Layer(1).Position(1).
+                  Left().Layer(1).Position(1).MinSize(FromDIP(wxSize(200,-1))).
                   CloseButton(true).MaximizeButton(true).MinimizeButton().
                   IconMin(wxArtProvider::GetBitmapBundle(wxART_CUT, wxART_MENU)));
 
@@ -2573,6 +2573,9 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl()
         tree->AppendItem(id, "Subitem 3", 1);
         tree->AppendItem(id, "Subitem 4", 1);
         tree->AppendItem(id, "Subitem 5", 1);
+        for (int j = 6; j <= 20; ++j)
+            tree->AppendItem(id, wxString::Format("Subitem %d", j), 1);
+        tree->Expand(id);
     }
 
 

Platform and version information

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


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

Reply all
Reply to author
Forward
0 new messages