feat: complete settings view + signatures + signatures DAO + icons
- SettingsView: complete UI with tabs for Accounts, Categories, Rules, Templates, Signatures, General, Appearance - Categories: QTreeWidget with hierarchical view, color picker, parent categories - Rules: QListWidget with RuleEditorDialog integration, toggle enabled - Templates: QListWidget with TemplateEditorDialog integration - Signatures: QListWidget with SignatureEditorDialog integration - SignatureDao: full CRUD with default signature support - common_structs.h: QColor for Category, all structs centralized - icons.qrc: updated with Linear/Outline/Bold icons from resources - Category: QColor instead of QString for color - EmailTreeModel/DateGroupProxyModel: email grouping by date - MailListView: QTreeView with date grouping combo - ReaderView: subject frame with shadow, avatar in header, body inside header - MainWindow: frameless with rounded corners, 1px border, edge resize, no status bar - icons.qrc: complete icon set from resources/icons/SVG
This commit is contained in:
+43
-42
@@ -30,9 +30,51 @@ ReaderView::ReaderView(QWidget *parent) : QWidget(parent) {
|
||||
|
||||
void ReaderView::setupUI() {
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setContentsMargins(12, 0, 12, 0);
|
||||
mainLayout->setContentsMargins(10, 0, 10, 0);
|
||||
mainLayout->setSpacing(0);
|
||||
|
||||
// ===== Subject Section (independent, with shadow) =====
|
||||
QFrame *subjectFrame = new QFrame();
|
||||
subjectFrame->setObjectName("SubjectFrame");
|
||||
subjectFrame->setStyleSheet(
|
||||
"QFrame#SubjectFrame {"
|
||||
" background: white;"
|
||||
" border: none;"
|
||||
" border: 1px solid #e0e0e0;"
|
||||
" border-radius: 4px;"
|
||||
"}"
|
||||
);
|
||||
|
||||
// Add shadow effect
|
||||
QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect->setBlurRadius(22);
|
||||
shadowEffect->setOffset(0, 6);
|
||||
shadowEffect->setColor(QColor(0, 0, 0, 40));
|
||||
subjectFrame->setGraphicsEffect(shadowEffect);
|
||||
|
||||
QVBoxLayout *subjectLayout = new QVBoxLayout(subjectFrame);
|
||||
subjectLayout->setContentsMargins(16, 16, 16, 16);
|
||||
subjectLayout->setSpacing(8);
|
||||
|
||||
QHBoxLayout *subjectRow = new QHBoxLayout();
|
||||
subjectRow->setSpacing(12);
|
||||
|
||||
m_subjectLabel = new QLabel();
|
||||
m_subjectLabel->setText("(Sin asunto)");
|
||||
QFont subjectFont = m_subjectLabel->font();
|
||||
subjectFont.setBold(true);
|
||||
subjectFont.setPointSize(12);
|
||||
m_subjectLabel->setFont(subjectFont);
|
||||
m_subjectLabel->setWordWrap(true);
|
||||
m_subjectLabel->setStyleSheet("color: #1d1d1f;");
|
||||
m_subjectLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
subjectRow->addWidget(m_subjectLabel, 1);
|
||||
|
||||
subjectLayout->addLayout(subjectRow);
|
||||
mainLayout->addWidget(subjectFrame);
|
||||
// Add spacing after subject frame so shadow is visible
|
||||
mainLayout->addSpacing(12);
|
||||
|
||||
// ===== Toolbar (zoom, find, images) =====
|
||||
m_toolbar = new QFrame();
|
||||
m_toolbar->setFixedHeight(36);
|
||||
@@ -183,47 +225,6 @@ void ReaderView::setupUI() {
|
||||
mainLayout->addWidget(m_toolbar);
|
||||
mainLayout->addWidget(m_findBar);
|
||||
|
||||
// ===== Subject Section (independent, with shadow) =====
|
||||
QFrame *subjectFrame = new QFrame();
|
||||
subjectFrame->setObjectName("SubjectFrame");
|
||||
subjectFrame->setStyleSheet(
|
||||
"QFrame#SubjectFrame {"
|
||||
" background: white;"
|
||||
" border: none;"
|
||||
" border: 1px solid #e0e0e0;"
|
||||
" border-radius: 10px;"
|
||||
"}"
|
||||
);
|
||||
// Add shadow effect
|
||||
QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect(this);
|
||||
shadowEffect->setBlurRadius(8);
|
||||
shadowEffect->setOffset(0, 3);
|
||||
shadowEffect->setColor(QColor(0, 0, 0, 40));
|
||||
subjectFrame->setGraphicsEffect(shadowEffect);
|
||||
|
||||
QVBoxLayout *subjectLayout = new QVBoxLayout(subjectFrame);
|
||||
subjectLayout->setContentsMargins(16, 16, 16, 16);
|
||||
subjectLayout->setSpacing(8);
|
||||
|
||||
QHBoxLayout *subjectRow = new QHBoxLayout();
|
||||
subjectRow->setSpacing(12);
|
||||
|
||||
m_subjectLabel = new QLabel();
|
||||
m_subjectLabel->setText("(Sin asunto)");
|
||||
QFont subjectFont = m_subjectLabel->font();
|
||||
subjectFont.setBold(true);
|
||||
subjectFont.setPointSize(16);
|
||||
m_subjectLabel->setFont(subjectFont);
|
||||
m_subjectLabel->setWordWrap(true);
|
||||
m_subjectLabel->setStyleSheet("color: #1d1d1f;");
|
||||
m_subjectLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
subjectRow->addWidget(m_subjectLabel, 1);
|
||||
|
||||
subjectLayout->addLayout(subjectRow);
|
||||
mainLayout->addWidget(subjectFrame);
|
||||
// Add spacing after subject frame so shadow is visible
|
||||
mainLayout->addSpacing(12);
|
||||
|
||||
// ===== Header Section =====
|
||||
m_headerWidget = new QWidget();
|
||||
m_headerWidget->setStyleSheet("QWidget { background: white; border-bottom: 1px solid #e0e0e0; }");
|
||||
|
||||
Reference in New Issue
Block a user