From 70a753fb18488f20f258431bb950245bd7cadac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Sun, 16 Aug 2026 23:38:30 +0200 Subject: [PATCH] [Client] Open the invite dialog taller by default without enforcing a minimum size --- .../src/interface/widgets/dialogs/dlg_invite_to_game.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_invite_to_game.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_invite_to_game.cpp index 643d41c89..4ce2b5fdc 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_invite_to_game.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_invite_to_game.cpp @@ -4,10 +4,12 @@ #include "../server/user/user_list_widget.h" #include "../tabs/tab_supervisor.h" +#include #include #include #include #include +#include #include #include #include @@ -21,7 +23,6 @@ DlgInviteToGame::DlgInviteToGame(TabSupervisor *_tabSupervisor, excludeUserNames(_excludeUserNames) { setModal(true); - setMinimumWidth(320); searchEdit = new QLineEdit(this); searchEdit->setClearButtonEnabled(true); @@ -76,6 +77,12 @@ DlgInviteToGame::DlgInviteToGame(TabSupervisor *_tabSupervisor, updateEmptyLabel(); retranslateUi(); + + // Default to a comfortably tall dialog so the list has room to breathe, + // capped by the available screen. No minimum is enforced: small screens + // and manual resizing can go shorter than this. + const QRect availableScreen = QGuiApplication::primaryScreen()->availableGeometry(); + resize(sizeHint().width(), qMin(sizeHint().height() * 3, availableScreen.height() * 4 / 5)); } void DlgInviteToGame::searchTextChanged(const QString &text)