feat: Wino-style compact mail view with display modes + hover actions
- CompactMailDelegate: 3 display modes (Compact/Medium/Spacious) like WinUI original * Compact: 64px, minimal, no preview * Medium: 96px, with preview, detailed categories * Spacious: 120px, full padding, preview visible - Hover actions: Reply (↩), Forward (↪), Mark unread (✎) on right side - Unread dot indicator (top-right, blue) like WinUI - User-configurable display mode via combo box in filter bar - MainMainWindow handlers for reply/forward/mark-unread from compact view - Signals: replyRequested, forwardRequested, markUnreadRequested
This commit is contained in:
@@ -47,7 +47,10 @@ template <> constexpr inline auto CompactMailDelegate::qt_create_metaobjectdata<
|
||||
"moreRequested",
|
||||
"QPoint",
|
||||
"globalPos",
|
||||
"mailClicked"
|
||||
"mailClicked",
|
||||
"replyRequested",
|
||||
"forwardRequested",
|
||||
"markUnreadRequested"
|
||||
};
|
||||
|
||||
QtMocHelpers::UintData qt_methods {
|
||||
@@ -71,6 +74,18 @@ template <> constexpr inline auto CompactMailDelegate::qt_create_metaobjectdata<
|
||||
QtMocHelpers::SignalData<void(int)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{
|
||||
{ QMetaType::Int, 3 },
|
||||
}}),
|
||||
// Signal 'replyRequested'
|
||||
QtMocHelpers::SignalData<void(int)>(10, 2, QMC::AccessPublic, QMetaType::Void, {{
|
||||
{ QMetaType::Int, 3 },
|
||||
}}),
|
||||
// Signal 'forwardRequested'
|
||||
QtMocHelpers::SignalData<void(int)>(11, 2, QMC::AccessPublic, QMetaType::Void, {{
|
||||
{ QMetaType::Int, 3 },
|
||||
}}),
|
||||
// Signal 'markUnreadRequested'
|
||||
QtMocHelpers::SignalData<void(int)>(12, 2, QMC::AccessPublic, QMetaType::Void, {{
|
||||
{ QMetaType::Int, 3 },
|
||||
}}),
|
||||
};
|
||||
QtMocHelpers::UintData qt_properties {
|
||||
};
|
||||
@@ -99,6 +114,9 @@ void CompactMailDelegate::qt_static_metacall(QObject *_o, QMetaObject::Call _c,
|
||||
case 2: _t->categoryRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
|
||||
case 3: _t->moreRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1])),(*reinterpret_cast<std::add_pointer_t<QPoint>>(_a[2]))); break;
|
||||
case 4: _t->mailClicked((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
|
||||
case 5: _t->replyRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
|
||||
case 6: _t->forwardRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
|
||||
case 7: _t->markUnreadRequested((*reinterpret_cast<std::add_pointer_t<int>>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
@@ -113,6 +131,12 @@ void CompactMailDelegate::qt_static_metacall(QObject *_o, QMetaObject::Call _c,
|
||||
return;
|
||||
if (QtMocHelpers::indexOfMethod<void (CompactMailDelegate::*)(int )>(_a, &CompactMailDelegate::mailClicked, 4))
|
||||
return;
|
||||
if (QtMocHelpers::indexOfMethod<void (CompactMailDelegate::*)(int )>(_a, &CompactMailDelegate::replyRequested, 5))
|
||||
return;
|
||||
if (QtMocHelpers::indexOfMethod<void (CompactMailDelegate::*)(int )>(_a, &CompactMailDelegate::forwardRequested, 6))
|
||||
return;
|
||||
if (QtMocHelpers::indexOfMethod<void (CompactMailDelegate::*)(int )>(_a, &CompactMailDelegate::markUnreadRequested, 7))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,14 +159,14 @@ int CompactMailDelegate::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 5)
|
||||
if (_id < 8)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 5;
|
||||
_id -= 8;
|
||||
}
|
||||
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
if (_id < 5)
|
||||
if (_id < 8)
|
||||
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||
_id -= 5;
|
||||
_id -= 8;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
@@ -176,4 +200,22 @@ void CompactMailDelegate::mailClicked(int _t1)
|
||||
{
|
||||
QMetaObject::activate<void>(this, &staticMetaObject, 4, nullptr, _t1);
|
||||
}
|
||||
|
||||
// SIGNAL 5
|
||||
void CompactMailDelegate::replyRequested(int _t1)
|
||||
{
|
||||
QMetaObject::activate<void>(this, &staticMetaObject, 5, nullptr, _t1);
|
||||
}
|
||||
|
||||
// SIGNAL 6
|
||||
void CompactMailDelegate::forwardRequested(int _t1)
|
||||
{
|
||||
QMetaObject::activate<void>(this, &staticMetaObject, 6, nullptr, _t1);
|
||||
}
|
||||
|
||||
// SIGNAL 7
|
||||
void CompactMailDelegate::markUnreadRequested(int _t1)
|
||||
{
|
||||
QMetaObject::activate<void>(this, &staticMetaObject, 7, nullptr, _t1);
|
||||
}
|
||||
QT_WARNING_POP
|
||||
|
||||
Reference in New Issue
Block a user