diff options
Diffstat (limited to 'src/controller.cpp')
-rw-r--r-- | src/controller.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/controller.cpp b/src/controller.cpp index 0a502da..35d6dae 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -239,8 +239,11 @@ void Controller::handleIncomingNotification(const QString &sender, const QIcon & QFont large("MetaWatch Large 16pt"); large.setPixelSize(16); + // Render notification background p.drawImage(0, 0, QImage(SailfishApp::pathTo("qml/watch/notification.png").toLocalFile())); - icon.paint(&p, 0, 96 - 24, 24, 24, Qt::AlignLeft | Qt::AlignBottom); + + // Render the associated icon on the bottom left corner + icon.paint(&p, 0, 96 - 24, 28, 24, Qt::AlignLeft | Qt::AlignBottom); QString title = summary; bool title_drawn_fully = false; @@ -248,6 +251,7 @@ void Controller::handleIncomingNotification(const QString &sender, const QIcon & title = QString("%1 %2").arg(count).arg(summary); } + // Render title area p.setFont(large); if (!title.isEmpty()) { QRect area(2, 2, 96 - 18, 18); @@ -264,6 +268,8 @@ void Controller::handleIncomingNotification(const QString &sender, const QIcon & const int max_y = 96 - 24; int y = 26; + // Now render the contents + // If the title did not fit in the title area, also draw it fully here. p.setFont(small); if (!title_drawn_fully && !title.isEmpty()) { QRect r; |