summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index fcc1308..8fed3c6 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -222,7 +222,11 @@ void QtChatWindow::setName(const String& name) {
}
void QtChatWindow::updateTitleWithUnreadCount() {
- setWindowTitle(contact_);
+ if (isWindow()) {
+ setWindowTitle(unreadCount_ > 0 ? QString("(%1) %2").arg(unreadCount_).arg(contact_) : contact_);
+ } else {
+ setWindowTitle(contact_);
+ }
emit titleUpdated();
}
@@ -318,7 +322,18 @@ void QtChatWindow::show() {
}
void QtChatWindow::activate() {
+ if (isWindow()) {
+ QWidget::show();
+ }
emit wantsToActivate();
}
+void QtChatWindow::resizeEvent(QResizeEvent*) {
+ emit geometryChanged();
+}
+
+void QtChatWindow::moveEvent(QMoveEvent*) {
+ emit geometryChanged();
+}
+
}