diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-17 10:24:05 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-17 10:24:05 +0100 |
| commit | c608ce2bfb5e4a6aba319e23d4a8bd299ebb4a3b (patch) | |
| tree | e73bb5e5fce8711a30ff5233a29ebcebb3c452a9 /src/mainwindow.cpp | |
| parent | 60c6899b3adb8fcfc2ad4f780b4a314b0af59344 (diff) | |
| download | qtmaildir-c608ce2bfb5e4a6aba319e23d4a8bd299ebb4a3b.tar.gz qtmaildir-c608ce2bfb5e4a6aba319e23d4a8bd299ebb4a3b.zip | |
fix: fall back to icons the installed themes still carry
Archive, Restore and the Inbox filter rendered as text only, and three
icon tests failed on master: a system update left no theme in the
candy-icons inheritance chain carrying mail-archive, edit-undelete or a
findable mail-inbox (Breeze ships it only as a 16px -symbolic).
archive and restore gain archive-insert and document-revert in the
kThemeIcons fallback slot; the Inbox filter uses mail-folder-inbox, the
folder shape the Sent filter already follows. Closes item 215.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4377870..f719689 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2198,11 +2198,16 @@ const QHash<QString, QPair<QString, QString>> kThemeIcons = { // NOT mail-mark-read, which mark_all_read below uses. The two shared it // in 0.12.0, and with the toolbar icon-only the icon is the whole // control: two buttons with different consequences looked identical. - { QStringLiteral("archive"), { QStringLiteral("mail-archive"), QString() } }, + // + // Item 215: Breeze, Adwaita and candy-icons carry no `mail-archive`, so + // `archive-insert` (Breeze's box-with-arrow) is the second chance. + { QStringLiteral("archive"), { QStringLiteral("mail-archive"), QStringLiteral("archive-insert") } }, { QStringLiteral("delete"), { QStringLiteral("edit-delete"), QString() } }, // The inverse of delete, and the theme's own name for it: the icon // every desktop uses for taking something back out of the wastebasket. - { QStringLiteral("restore"), { QStringLiteral("edit-undelete"), QString() } }, + // Item 215: no installed theme carries it any more, so `document-revert` + // ("take it back") follows. NOT edit-undo, which undo uses. + { QStringLiteral("restore"), { QStringLiteral("edit-undelete"), QStringLiteral("document-revert") } }, // A SEARCH, not a delete. The action reports what it finds and moves // nothing, so an icon from the delete family would promise the one // thing it deliberately does not do. @@ -3317,10 +3322,12 @@ void MainWindow::buildSavedQueryRow(QWidget *parent, QVBoxLayout *layout) // label can be wrong for years without anyone noticing. // // mail-folder-sent, not mail-sent: the former is the folder shape every - // theme ships, the latter is the envelope-in-flight some do not. + // theme ships, the latter is the envelope-in-flight some do not. The + // inbox follows the same rule since item 215: Breeze ships + // `mail-inbox` only as a 16px symbolic, which QIcon does not find. static const QHash<QString, QString> filterIcons = { { QStringLiteral("unread"), QStringLiteral("mail-mark-unread") }, - { QStringLiteral("inbox"), QStringLiteral("mail-inbox") }, + { QStringLiteral("inbox"), QStringLiteral("mail-folder-inbox") }, { QStringLiteral("flagged"), QStringLiteral("starred") }, { QStringLiteral("sent"), QStringLiteral("mail-folder-sent") }, { QStringLiteral("drafts"), QStringLiteral("document-edit") }, |
