From ae84b9e45877783e98faa908414eaa9e63b5046f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 19:52:50 +0200 Subject: feat(about): custom About dialog with icon, copyright and project link Replace QMessageBox::about with a QDialog laid out in two columns: the application icon on the left at 40%, the version, description, copyright and AI-assistance notice on the right at 60%. A full-width row below both carries the project URL. The copyright line, GPLv2 notice and AI-assistance disclosure were absent from the About window despite being present in the source headers and the README. --- src/mainwindow.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1385f01..517941a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -594,13 +595,51 @@ void MainWindow::showShortcutReference() void MainWindow::showAbout() { - QMessageBox::about( - this, tr("About qtmaildir"), - tr("

qtmaildir %1

" - "

A Qt6 mail client for notmuch-indexed Maildirs.

" - "

Reads and organizes local mail. Fetching and sending are " - "handled by external scripts.

") - .arg(QStringLiteral(QTMAILDIR_VERSION))); + QDialog dialog(this); + dialog.setWindowTitle(tr("About qtmaildir")); + + auto *icon = new QLabel(&dialog); + icon->setPixmap(QIcon(QStringLiteral(":/icons/qtmaildir.svg")) + .pixmap(QSize(160, 160))); + icon->setAlignment(Qt::AlignCenter); + + auto *text = new QLabel(&dialog); + text->setTextFormat(Qt::RichText); + text->setWordWrap(true); + text->setAlignment(Qt::AlignTop); + text->setText(tr("

qtmaildir %1

" + "

A Qt6 mail client for notmuch-indexed Maildirs.

" + "

Reads and organizes local mail. Fetching and sending " + "are handled by external scripts.

" + "

Copyright © 2026 Danilo M. " + "<danix@danix.xyz>
" + "Licensed under the GNU General Public License " + "version 2.

" + "

Developed with AI assistance. All code is reviewed, " + "tested and curated by the maintainer.

") + .arg(QStringLiteral(QTMAILDIR_VERSION))); + + auto *link = new QLabel( + QStringLiteral("" + "https://danix.xyz/qtmaildir"), + &dialog); + link->setTextFormat(Qt::RichText); + link->setAlignment(Qt::AlignCenter); + link->setOpenExternalLinks(true); + + auto *buttons = new QDialogButtonBox(QDialogButtonBox::Ok, &dialog); + connect(buttons, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); + + auto *columns = new QHBoxLayout; + columns->addWidget(icon, 40); + columns->addWidget(text, 60); + + auto *layout = new QVBoxLayout(&dialog); + layout->addLayout(columns); + layout->addWidget(link); + layout->addWidget(buttons); + + dialog.exec(); } void MainWindow::wireWorker() -- cgit v1.2.3