From 10b99a74153898131f2214a7ee5a6637ed401f30 Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Wed, 5 Aug 2026 20:09:22 +0200 Subject: [PATCH] [Dialogs] Focus login after selecting server, center update message box (#7080) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ConnectDialog] Focus login field after selecting a server (#3346) Took 12 minutes * [UpdateDialog] Center update message boxes over the main window (#3538) --------- Co-authored-by: Lukas BrĂ¼bach --- cockatrice/src/interface/widgets/dialogs/dlg_connect.cpp | 1 + cockatrice/src/interface/widgets/dialogs/dlg_update.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_connect.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_connect.cpp index f1e7a8ba1..aa8a916f8 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_connect.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_connect.cpp @@ -271,6 +271,7 @@ void DlgConnect::updateDisplayInfo(const QString &saveName) hostEdit->setText(_data.at(1)); portEdit->setText(_data.at(2)); playernameEdit->setText(_data.at(3)); + playernameEdit->setFocus(); savePasswordCheckBox->setChecked(savePasswordStatus); if (savePasswordStatus) { diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp index fb18f7216..7cf58d3e0 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_update.cpp @@ -134,7 +134,7 @@ void DlgUpdate::finishedUpdateCheck(bool needToUpdate, bool isCompatible, Releas // If there's no need to update, tell them that. However we still allow them to run the // downloader themselves if there's a compatible build QMessageBox::information( - this, tr("No Update Available"), + window(), tr("No Update Available"), tr("Cockatrice is up to date!") + "

" + tr("You are already running the latest version available in the chosen release channel.") + "
" + "" + tr("Current version") + QString(": %1
").arg(VERSION_STRING) + "" + @@ -147,7 +147,7 @@ void DlgUpdate::finishedUpdateCheck(bool needToUpdate, bool isCompatible, Releas if (isCompatible) { int reply; reply = QMessageBox::question( - this, tr("Update Available"), + window(), tr("Update Available"), tr("A new version of Cockatrice is available!") + "

" + "" + tr("New version") + QString(": %1
").arg(release->getName()) + "" + tr("Released") + QString(": %1 (").arg(publishDate, release->getDescriptionUrl()) + tr("Changelog") + @@ -161,7 +161,7 @@ void DlgUpdate::finishedUpdateCheck(bool needToUpdate, bool isCompatible, Releas } } else { QMessageBox::information( - this, tr("Update Available"), + window(), tr("Update Available"), tr("A new version of Cockatrice is available!") + "

" + "" + tr("New version") + QString(": %1
").arg(release->getName()) + "" + tr("Released") + QString(": %1 (
").arg(publishDate, release->getDescriptionUrl()) + tr("Changelog") +