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:
@@ -51,7 +51,7 @@ template <> constexpr inline auto EmailListModel::qt_create_metaobjectdata<qt_me
|
||||
qt_methods, qt_properties, qt_enums);
|
||||
}
|
||||
Q_CONSTINIT const QMetaObject EmailListModel::staticMetaObject = { {
|
||||
QMetaObject::SuperData::link<QAbstractListModel::staticMetaObject>(),
|
||||
QMetaObject::SuperData::link<QAbstractTableModel::staticMetaObject>(),
|
||||
qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14EmailListModelE_t>.stringdata,
|
||||
qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14EmailListModelE_t>.data,
|
||||
qt_static_metacall,
|
||||
@@ -79,12 +79,12 @@ void *EmailListModel::qt_metacast(const char *_clname)
|
||||
if (!_clname) return nullptr;
|
||||
if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN14EmailListModelE_t>.strings))
|
||||
return static_cast<void*>(this);
|
||||
return QAbstractListModel::qt_metacast(_clname);
|
||||
return QAbstractTableModel::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int EmailListModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QAbstractListModel::qt_metacall(_c, _id, _a);
|
||||
_id = QAbstractTableModel::qt_metacall(_c, _id, _a);
|
||||
return _id;
|
||||
}
|
||||
QT_WARNING_POP
|
||||
|
||||
Reference in New Issue
Block a user