| 9 | #include <QTimer> |
| 10 | |
| 11 | MarkdownNoteEntry::MarkdownNoteEntry(const MarkdownNoteData &data, QWidget *parent) |
| 12 | : QFrame(parent), noteData(data) |
| 13 | { |
| 14 | // Custom QFrame subclass: opt in to styled-background painting so the |
| 15 | // stylesheet's background-color actually fills the widget rect. Without |
| 16 | // this, Qt may leave the widget transparent and the view delegate's |
| 17 | // selection fill (#4d4d4d) bleeds through where the widget is placed. |
| 18 | setAttribute(Qt::WA_StyledBackground, true); |
| 19 | isDarkMode = palette().color(QPalette::Window).lightness() < 128; |
| 20 | setupUI(); |
| 21 | applyStyle(); |
| 22 | updatePreview(); |
| 23 | } |
| 24 | |
| 25 | // Phase M.3: New constructor for LinkObject-based notes |
| 26 | MarkdownNoteEntry::MarkdownNoteEntry(const NoteDisplayData &data, QWidget *parent) |