feat: responsive compact mail view + folder unread badges
- CompactMailDelegate: card-based view for narrow panels (<420px) * Avatar with hash-based color, sender + date (relative format) * Subject line with attachment icon * Action buttons: flag, delete, category, more (context menu) * Unread highlight with light blue background + bold sender - MailListView: automatic switch between tree/table (wide) and list/cards (narrow) * QStackedWidget with QTreeView + QListView sharing same proxy model * resizeEvent threshold at 420px * Signals forwarded to MainMainWindow for actions - FolderTreeDelegate: custom paint for folder tree * Unread count badge (blue pill) right-aligned on folder nodes * Account nodes bold, folder nodes normal weight * Proper indentation per depth level - MailItemDao::countUnreadByFolderId() for real-time unread counts - MainMainWindow handlers for compact actions (flag, delete, category, more menu)
This commit is contained in:
@@ -52,7 +52,10 @@ template <> constexpr inline auto AccountSetupDialog::qt_create_metaobjectdata<q
|
||||
"id",
|
||||
"startOAuthAuthentication",
|
||||
"onAccountAdded",
|
||||
"onAuthTimeout"
|
||||
"onAuthTimeout",
|
||||
"onConnectionWizardFinished",
|
||||
"Account::ConnectionSettings",
|
||||
"settings"
|
||||
};
|
||||
|
||||
QtMocHelpers::UintData qt_methods {
|
||||
@@ -78,6 +81,10 @@ template <> constexpr inline auto AccountSetupDialog::qt_create_metaobjectdata<q
|
||||
}}),
|
||||
// Slot 'onAuthTimeout'
|
||||
QtMocHelpers::SlotData<void()>(12, 2, QMC::AccessPrivate, QMetaType::Void),
|
||||
// Slot 'onConnectionWizardFinished'
|
||||
QtMocHelpers::SlotData<void(const Account::ConnectionSettings &)>(13, 2, QMC::AccessPrivate, QMetaType::Void, {{
|
||||
{ 0x80000000 | 14, 15 },
|
||||
}}),
|
||||
};
|
||||
QtMocHelpers::UintData qt_properties {
|
||||
};
|
||||
@@ -109,6 +116,7 @@ void AccountSetupDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, i
|
||||
case 5: _t->startOAuthAuthentication(); break;
|
||||
case 6: _t->onAccountAdded((*reinterpret_cast<std::add_pointer_t<Account>>(_a[1]))); break;
|
||||
case 7: _t->onAuthTimeout(); break;
|
||||
case 8: _t->onConnectionWizardFinished((*reinterpret_cast<std::add_pointer_t<Account::ConnectionSettings>>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
@@ -137,14 +145,14 @@ int AccountSetupDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 8)
|
||||
if (_id < 9)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 8;
|
||||
_id -= 9;
|
||||
}
|
||||
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 8)
|
||||
if (_id < 9)
|
||||
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||
_id -= 8;
|
||||
_id -= 9;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user