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:
@@ -261,6 +261,9 @@ void MainMainWindow::setupMailPage()
|
||||
connect(m_mailListView, &MailListView::deleteRequested, this, &MainMainWindow::onDeleteRequested);
|
||||
connect(m_mailListView, &MailListView::categoryRequested, this, &MainMainWindow::onCategoryRequested);
|
||||
connect(m_mailListView, &MailListView::moreRequested, this, &MainMainWindow::onMoreRequested);
|
||||
connect(m_mailListView, &MailListView::replyRequested, this, &MainMainWindow::onReplyRequested);
|
||||
connect(m_mailListView, &MailListView::forwardRequested, this, &MainMainWindow::onForwardRequested);
|
||||
connect(m_mailListView, &MailListView::markUnreadRequested, this, &MainMainWindow::onMarkUnreadRequested);
|
||||
m_folderSplitter->addWidget(m_mailListView);
|
||||
|
||||
// Viewer stack: placeholder, reader, compose
|
||||
@@ -525,6 +528,30 @@ void MainMainWindow::onMoreRequested(int mailId, const QPoint &globalPos)
|
||||
menu.exec(globalPos);
|
||||
}
|
||||
|
||||
void MainMainWindow::onReplyRequested(int mailId)
|
||||
{
|
||||
onReaderReplyRequested(mailId);
|
||||
}
|
||||
|
||||
void MainMainWindow::onForwardRequested(int mailId)
|
||||
{
|
||||
onReaderForwardRequested(mailId);
|
||||
}
|
||||
|
||||
void MainMainWindow::onMarkUnreadRequested(int mailId)
|
||||
{
|
||||
auto item = MailItemDao::findById(mailId);
|
||||
if (item.has_value()) {
|
||||
item->setRead(false);
|
||||
MailItemDao::update(*item);
|
||||
m_emailModel->refresh();
|
||||
if (m_currentMailId == mailId) {
|
||||
m_emailViewer->setMailItem(&*item);
|
||||
}
|
||||
statusBar()->showMessage(tr("Marcado como no leído"), 2000);
|
||||
}
|
||||
}
|
||||
|
||||
void MainMainWindow::onNewMessage()
|
||||
{ // Show compose view in the viewer stack
|
||||
m_embeddedComposeView->initializeComposition();
|
||||
|
||||
Reference in New Issue
Block a user