wxQt: increase default size for wxFileDialog/wxDirDialog. (PR #24643)

40 views
Skip to first unread message

dsa-t

unread,
Jun 25, 2024, 2:23:29 AM (10 days ago) Jun 25
to wx-...@googlegroups.com, Subscribed

The default size was very small by default (400x250), this increases it wxFileDialog/wxDirDialog to Qt's hint size.


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

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

Commit Summary

  • 6352273 wxQt: increase default size for wxFileDialog/wxDirDialog.

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

AliKet

unread,
Jun 26, 2024, 4:56:54 PM (9 days ago) Jun 26
to wx-...@googlegroups.com, Subscribed

IMHO, I think we can do this for all QDialog descendants by applying something like this

diff --git a/src/qt/window.cpp b/src/qt/window.cpp
index 6cbb6a9f3c..c63f989163 100644
--- a/src/qt/window.cpp
+++ b/src/qt/window.cpp
@@ -442,8 +442,9 @@ bool wxWindowQt::Create( wxWindowQt * parent, wxWindowID id, const wxPoint & pos
         p = pos;
 
     wxSize initialSize = size;
-    initialSize.SetDefaults( IsTopLevel() ? wxTopLevelWindowBase::GetDefaultSize()
-                                          : wxQtGetBestSize( GetHandle() ) );
+    initialSize.SetDefaults( IsTopLevel() && !GetHandle()->inherits("QDialog") ?
+                                wxTopLevelWindowBase::GetDefaultSize() :
+                                wxQtGetBestSize( GetHandle() ) );
 
     DoMoveWindow( p.x, p.y, initialSize.GetWidth(), initialSize.GetHeight() );

What do you think ?


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

dsa-t

unread,
Jun 28, 2024, 4:31:42 PM (7 days ago) Jun 28
to wx-...@googlegroups.com, Subscribed

What do you think ?

Your idea seems better, and is working as expected with file dialogs.


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

VZ

unread,
Jul 3, 2024, 7:15:17 PM (2 days ago) Jul 3
to wx-...@googlegroups.com, Subscribed

Should this one be closed and the patch above applied it instead or is/will it be part of some other PR?


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

dsa-t

unread,
Jul 3, 2024, 8:08:18 PM (2 days ago) Jul 3
to wx-...@googlegroups.com, Subscribed

Should this one be closed and the patch above applied

Sure.


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

dsa-t

unread,
Jul 3, 2024, 8:08:18 PM (2 days ago) Jul 3
to wx-...@googlegroups.com, Subscribed

Closed #24643.


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/24643/issue_event/13387569089@github.com>

Reply all
Reply to author
Forward
0 new messages